Skip to content

Commit

Permalink
deregister callback to avoid sending on closed channel
Browse files Browse the repository at this point in the history
Signed-off-by: zachaller <[email protected]>
  • Loading branch information
zachaller committed Aug 8, 2023
1 parent e4cb311 commit 24c9e81
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/fixtures/when.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ func (w *When) WatchRolloutStatus(expectedStatus string, timeouts ...time.Durati
go controller.Run(ctx)
finalStatus := statusOptions.WatchStatus(ctx.Done(), rolloutUpdates)

controller.DeregisterCallbacks()

cancel()
close(rolloutUpdates)

Expand Down

0 comments on commit 24c9e81

Please sign in to comment.