File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -181,14 +181,13 @@ func TestWatchSocketCleanup(t *testing.T) {
181181 }
182182
183183 // 5. Watch the socket again
184- // If the bug exists, this will return the OLD closed channel (ch1) or a closed channel
185184 ch2 := s .WatchSocket (context .Background (), socket )
186185
187- // 6. Verify ch2 is NOT closed immediately
186+ // 6. Verify ch2 is open
188187 select {
189188 case <- ch2 :
190- t .Fatal ("WatchSocket returned a closed channel on the second call! The map entry was likely not cleaned up. " )
189+ t .Fatal ("channel is closed but expected to be open " )
191190 case <- time .After (200 * time .Millisecond ):
192- // If we wait a bit and it's still open, that's good .
191+ // Wait for at least one tick to ensure the watcher has had a chance to run .
193192 }
194193}
You can’t perform that action at this time.
0 commit comments