Skip to content

Commit

Permalink
Temporarily remove the time check from TestMutateRows_Retry_Exponenti…
Browse files Browse the repository at this point in the history
…alBackoff, to reduce flakiness
  • Loading branch information
liujiongxin committed Oct 23, 2023
1 parent c86ef9a commit eaf9477
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/mutaterows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ func TestMutateRows_Retry_TransientErrors(t *testing.T) {
}

// TestMutateRows_Retry_ExponentialBackoff tests that client will retry using exponential backoff.
// TODO: as the clients use jitter with different defaults, a correct and reliable check should look
// at more retry attempts. Before finding the best solution, we drop the check for now.
func TestMutateRows_Retry_ExponentialBackoff(t *testing.T) {
// 0. Common variables
const numRows int = 1
Expand Down Expand Up @@ -331,7 +333,7 @@ func TestMutateRows_Retry_ExponentialBackoff(t *testing.T) {
// 4a. Check the number of requests in the recorder
assert.Equal(t, numRPCs, len(recorder))

// 4b. Check the retry delays
// 4b. Log the retry delays
origReq := <-recorder
firstRetry := <-recorder
secondRetry := <-recorder
Expand All @@ -343,12 +345,7 @@ func TestMutateRows_Retry_ExponentialBackoff(t *testing.T) {

// Different clients may have different behaviors, we log the delays for informational purpose.
// Example: For the first retry delay, C++ client uses 100ms but Java client uses 10ms.
// Java client allows the second delay to be smaller than the first delay but C++ client doesn't.
t.Logf("The three retry delays are: %dms, %dms, %dms", firstDelay, secondDelay, thirdDelay)

// Basic assertions are used, but not all clients can pass them consistently.
assert.Less(t, firstDelay, secondDelay)
assert.Less(t, secondDelay, thirdDelay)
}

// TestMutateRows_Generic_MultiStreams tests that client can have multiple concurrent streams.
Expand Down

0 comments on commit eaf9477

Please sign in to comment.