Skip to content

Commit

Permalink
reloader: Minor fix to test - to improve for slow CI. (#978)
Browse files Browse the repository at this point in the history
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
  • Loading branch information
bwplotka authored Mar 26, 2019
1 parent 07e090a commit d65ef8d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/reloader/reloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ func TestReloader_RuleApply(t *testing.T) {
defer cancel()

reloadsSeen := 0
init := false
for {
select {
case <-ctx.Done():
Expand All @@ -226,9 +227,11 @@ func TestReloader_RuleApply(t *testing.T) {
}

rel := reloads.Load().(int)
if rel != 0 && rel <= reloadsSeen {
if init && rel <= reloadsSeen {
continue
}
init = true

reloadsSeen = rel

t.Log("Performing step number", rel)
Expand Down

0 comments on commit d65ef8d

Please sign in to comment.