File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1047,8 +1047,10 @@ func Test_watchEvents_Deadlock(t *testing.T) {
1047
1047
time .Sleep (2 * time .Second )
1048
1048
}
1049
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
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.
1052
1054
// deadlock.RLock()
1053
1055
// defer deadlock.RUnlock()
1054
1056
You can’t perform that action at this time.
0 commit comments