Skip to content

Commit 840f5f2

Browse files
committed
itest: allow AssertNonInteractiveRecvComplete more time to execute
Move the context definition inside the retry loop to create a new timeout context for each attempt. Double the retry period to allow multiple retries. This likely doesn't fully fix the flake, but using the full defaultWaitTimeout instead of half aligns better with its usage elsewhere.
1 parent d9dd3c0 commit 840f5f2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

itest/assertions.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,13 +1225,13 @@ func AssertAssetOutboundTransferWithOutputs(t *testing.T,
12251225
func AssertNonInteractiveRecvComplete(t *testing.T,
12261226
receiver taprpc.TaprootAssetsClient, totalInboundTransfers int) {
12271227

1228-
ctxb := context.Background()
1229-
ctxt, cancel := context.WithTimeout(ctxb, defaultWaitTimeout)
1230-
defer cancel()
1231-
12321228
// And finally, they should be marked as completed with a proof
12331229
// available.
12341230
err := wait.NoError(func() error {
1231+
ctxb := context.Background()
1232+
ctxt, cancel := context.WithTimeout(ctxb, defaultWaitTimeout/2)
1233+
defer cancel()
1234+
12351235
resp, err := receiver.AddrReceives(
12361236
ctxt, &taprpc.AddrReceivesRequest{},
12371237
)
@@ -1250,7 +1250,7 @@ func AssertNonInteractiveRecvComplete(t *testing.T,
12501250
}
12511251

12521252
return nil
1253-
}, defaultWaitTimeout/2)
1253+
}, defaultWaitTimeout)
12541254
require.NoError(t, err)
12551255
}
12561256

0 commit comments

Comments
 (0)