We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 768c9f5 commit b04ee04Copy full SHA for b04ee04
pkg/cache/cluster_test.go
@@ -1047,8 +1047,10 @@ func Test_watchEvents_Deadlock(t *testing.T) {
1047
time.Sleep(2 * time.Second)
1048
}
1049
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
+ //// 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.
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.
1054
// deadlock.RLock()
1055
// defer deadlock.RUnlock()
1056
0 commit comments