Skip to content

Commit b04ee04

Browse files
committed
clarify comment
Signed-off-by: Alexandre Gaudreault <[email protected]>
1 parent 768c9f5 commit b04ee04

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/cache/cluster_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -1047,8 +1047,10 @@ func Test_watchEvents_Deadlock(t *testing.T) {
10471047
time.Sleep(2 * time.Second)
10481048
}
10491049

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

0 commit comments

Comments
 (0)