Skip to content

Commit 12fdc95

Browse files
committed
itest: increase retry count and max backoff timeout for proof courier
Allow more retries and a longer maximum backoff duration in the default config to give proof transfers more time and reduce flakiness. Update itest timeout to scale with the new maximum backoff duration.
1 parent 840f5f2 commit 12fdc95

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

itest/send_test.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -759,8 +759,7 @@ func testReattemptFailedSendHashmailCourier(t *harnessTest) {
759759
expectedEventCount := nodeBackoffCfg.NumTries - 1
760760

761761
// Context timeout scales with expected number of events.
762-
timeout := time.Duration(expectedEventCount) *
763-
defaultProofTransferReceiverAckTimeout
762+
timeout := time.Duration(expectedEventCount) * nodeBackoffCfg.MaxBackoff
764763

765764
// Allow for some margin for the operations that aren't pure
766765
// waiting on the receiver ACK.
@@ -867,8 +866,7 @@ func testReattemptProofTransferOnTapdRestart(t *harnessTest) {
867866
expectedEventCount := nodeBackoffCfg.NumTries - 1
868867

869868
// Context timeout scales with expected number of events.
870-
timeout := time.Duration(expectedEventCount) *
871-
defaultProofTransferReceiverAckTimeout
869+
timeout := time.Duration(expectedEventCount) * nodeBackoffCfg.MaxBackoff
872870

873871
// Allow for some margin for the operations that aren't pure waiting on
874872
// the receiver ACK.
@@ -1028,8 +1026,7 @@ func testReattemptFailedSendUniCourier(t *harnessTest) {
10281026
expectedEventCount := nodeBackoffCfg.NumTries - 1
10291027

10301028
// Context timeout scales with expected number of events.
1031-
timeout := time.Duration(expectedEventCount) *
1032-
defaultProofTransferReceiverAckTimeout
1029+
timeout := time.Duration(expectedEventCount) * nodeBackoffCfg.MaxBackoff
10331030

10341031
// Allow for some margin for the operations that aren't pure waiting on
10351032
// the receiver ACK.

itest/tapd_harness.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ var (
5757
// for sending proofs with the hashmail courier.
5858
defaultHashmailBackoffConfig = proof.BackoffCfg{
5959
BackoffResetWait: time.Second,
60-
NumTries: 5,
60+
NumTries: 10,
6161
InitialBackoff: 300 * time.Millisecond,
62-
MaxBackoff: 600 * time.Millisecond,
62+
MaxBackoff: 2 * time.Second,
6363
}
6464

6565
// defaultUniverseRpcBackoffConfig is the default backoff config we'll
6666
// use for sending proofs with the universe RPC courier.
6767
defaultUniverseRpcBackoffConfig = proof.BackoffCfg{
6868
SkipInitDelay: true,
6969
BackoffResetWait: time.Second,
70-
NumTries: 5,
70+
NumTries: 10,
7171
InitialBackoff: 300 * time.Millisecond,
72-
MaxBackoff: 600 * time.Millisecond,
72+
MaxBackoff: 2 * time.Second,
7373
}
7474

7575
// defaultProofRetrievalDelay is the default delay we'll use for the

0 commit comments

Comments
 (0)