Skip to content

Commit

Permalink
Fix flaky TestReload
Browse files Browse the repository at this point in the history
Signed-off-by: albertteoh <albert.teoh@logz.io>
  • Loading branch information
albertteoh committed Nov 24, 2020
1 parent 2a0d0be commit 477bacb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/config/tlscfg/cert_watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ func TestReload(t *testing.T) {
waitUntil(func() bool {
// Logged when both matching public and private keys are modified in the cert.
// If mismatched keys are present in the cert, the "Failed to load certificate" error will be logged instead.
return logObserver.FilterMessage("Loaded modified certificate").Len() > 0
return logObserver.FilterMessage("Loaded modified certificate").
FilterField(zap.String("certificate", keyFile.Name())).Len() > 0
}, 100, time.Millisecond*200)

// Logged when the cert is modified with the client's public key due to
Expand Down

0 comments on commit 477bacb

Please sign in to comment.