fn/ContextGuard: test cancelling blocking context

Make sure WgWait() doesn't block.
This commit is contained in:
Boris Nagaev committed 2025-01-02 10:38:26 -03:00
1 parent a388c1f39d
commit 865da9c525
1 file changed
+6
+6
View File
@@ -298,6 +298,12 @@ func TestContextGuard(t *testing.T) {
case <-time.After(time.Second):
t.Fatalf("timeout")
}
// Cancel the context.
cancel()
// Make sure wg's counter gets to 0 eventually.
g.WgWait()
})
// Test that if we add the CustomTimeoutCGOpt option, then the context