mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-18 05:42:09 +01:00
fn/ContextGuard: test cancelling blocking context
Make sure WgWait() doesn't block.
This commit is contained in:
parent
a388c1f39d
commit
865da9c525
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user