Skip to content

Commit

Permalink
fix TestWatcher
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Nov 14, 2024
1 parent 40ae26c commit 88de955
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/encryption/key_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ func TestWatcher(t *testing.T) {
// Listen on watcher event
reloadEvent := make(chan struct{}, 10)
helper.eventAfterReloadByWatcher = func() {
var e struct{}
reloadEvent <- e
reloadEvent <- struct{}{}
}
// Use default config.
config := &Config{}
Expand All @@ -339,6 +338,7 @@ func TestWatcher(t *testing.T) {
// Create the key manager.
m, err := newKeyManagerImpl(client, config, helper)
re.NoError(err)
m.mu.keysRevision = 0
go m.StartBackgroundLoop(ctx)
_, err = m.GetKey(123)
re.Error(err)
Expand Down

0 comments on commit 88de955

Please sign in to comment.