Skip to content

Commit

Permalink
Merge branch 'main' into env2
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Oct 31, 2023
2 parents 1baaa1a + ecdface commit 4b873cc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions configmap/loglevel_change_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ func TestDynamicLogLevelAndBinaryFlag(t *testing.T) {
if err = os.WriteFile(binaryFlag, []byte{1, 2, 3, 4, 5}, 0o644); err != nil {
t.Fatalf("unable to write %v: %v", binaryFlag, err)
}
time.Sleep(2 * time.Second)
assert.Equal(t, u.Errors(), 1, "should have 1 error picked up as we wrote > 4 bytes")
time.Sleep(3 * time.Second)
// We might get more than 1 event for some reasons, so more than 1 error
errCount := u.Errors()
if errCount < 1 {
t.Errorf("Expected at least 1 error because we wrote more than validator accepts, got %d", errCount)
}
}

0 comments on commit 4b873cc

Please sign in to comment.