You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by aa...@apache.org on 2022/06/20 16:29:00 UTC
[rocketmq-clients] 02/02: CPP: fix compile issue for Ubuntu 18.04
This is an automated email from the ASF dual-hosted git repository.
aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
commit 06d1f1d527a0d91d419a3f31f991b91ee74dbe14
Author: Aaron Ai <ya...@gmail.com>
AuthorDate: Tue Jun 21 00:28:46 2022 +0800
CPP: fix compile issue for Ubuntu 18.04
---
cpp/src/main/cpp/base/tests/RetryPolicyTest.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/cpp/src/main/cpp/base/tests/RetryPolicyTest.cpp b/cpp/src/main/cpp/base/tests/RetryPolicyTest.cpp
index 4a49bcc..168b87a 100644
--- a/cpp/src/main/cpp/base/tests/RetryPolicyTest.cpp
+++ b/cpp/src/main/cpp/base/tests/RetryPolicyTest.cpp
@@ -22,6 +22,9 @@ ROCKETMQ_NAMESPACE_BEGIN
TEST(RetryPolicyTest, testBackoff) {
RetryPolicy policy{.max_attempt = 3,
.strategy = BackoffStrategy::Customized,
+ .initial = absl::Milliseconds(0),
+ .max = absl::Milliseconds(0),
+ .multiplier = 0.0f,
.next = {absl::Milliseconds(10), absl::Milliseconds(100), absl::Milliseconds(500)}};
ASSERT_EQ(policy.backoff(1), 10);
ASSERT_EQ(policy.backoff(2), 100);