zhjwpku commented on code in PR #633:
URL: https://github.com/apache/iceberg-cpp/pull/633#discussion_r3166082670
##########
src/iceberg/test/retry_util_test.cc:
##########
@@ -140,6 +201,32 @@ TEST(RetryRunnerTest, OnlyRetryOnMatchingError) {
EXPECT_EQ(attempts, 3);
}
+TEST(RetryRunnerTest, OnlyRetryOnTakesPrecedenceOverStopRetryOn) {
+ int call_count = 0;
+ int32_t attempts = 0;
+
+ auto result = RetryRunner(RetryConfig{.num_retries = 2,
+ .min_wait_ms = 1,
+ .max_wait_ms = 10,
+ .total_timeout_ms = 5000})
+ .OnlyRetryOn(ErrorKind::kCommitFailed)
+ .StopRetryOn({ErrorKind::kCommitFailed})
Review Comment:
I see `StopRetryOn` doesn't have a single error type signature like
`OnlyRetryOn`, is that by design?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]