Skip to content

Commit 2034543

Browse files
authored
Make testHedgingWhenAllAttemptsResultInNonFatalCodes more reliable (#1780)
Motivation: `testHedgingWhenAllAttemptsResultInNonFatalCodes` fails occasionally. The reason for this is that when the event stating that next scheduled attempt is cancelled is consumed it cancels the next scheduled attempt again. However, this is incorrect, another hedged result may have re-scheduled an attempt which is subsequently cancelled by accident. Modifications: Don't double cancel the next scheduled attempt. result: The test passes more reliably
1 parent f384235 commit 2034543

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+HedgingExecutor.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ extension ClientRPCExecutor.HedgingExecutor {
230230
}
231231

232232
case .cancelled:
233-
// Cancelling also resets the state.
234-
nextScheduledAttempt.cancel()
233+
()
235234
}
236235

237236
case .attemptCompleted(let outcome):

0 commit comments

Comments
 (0)