Skip to content

Commit

Permalink
clarify comment
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Gaudreault <[email protected]>
  • Loading branch information
agaudreault committed Jul 12, 2024
1 parent 768c9f5 commit b04ee04
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/cache/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,10 @@ func Test_watchEvents_Deadlock(t *testing.T) {
time.Sleep(2 * time.Second)
}

//// Uncommenting the following code will simulate a deadlock caused by client code holding a lock and
//// trying to acquire the same lock in the event callback
//// Uncommenting the following code will simulate a different deadlock on purpose caused by
//// client code holding a lock and trying to acquire the same lock in the event callback.
//// It provides an easy way to validate if the test detect deadlocks as expected.
//// If the test fails with this code commented, a deadlock do exist in the codebase.
// deadlock.RLock()
// defer deadlock.RUnlock()

Expand Down

0 comments on commit b04ee04

Please sign in to comment.