Skip to content

Commit

Permalink
[ISSUE apache#3949] fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
xdkxlk authored and drpmma committed Jul 13, 2022
1 parent afb89da commit e5124e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void testGetSubscriptionData() {
subscriptionGroupConfig.getGroupRetryPolicy().setCustomizedRetryPolicy(new CustomizedRetryPolicy(new long[] {1000}));
settings = this.grpcClientSettingsManager.getClientSettings(context);
assertEquals(RetryPolicy.newBuilder()
.setMaxAttempts(3)
.setMaxAttempts(4)
.setCustomizedBackoff(CustomizedBackoff.newBuilder()
.addNext(Durations.fromSeconds(1))
.build())
Expand All @@ -81,7 +81,7 @@ public void testGetSubscriptionData() {
subscriptionGroupConfig.getGroupRetryPolicy().setExponentialRetryPolicy(new ExponentialRetryPolicy(1000, 2000, 3));
settings = this.grpcClientSettingsManager.getClientSettings(context);
assertEquals(RetryPolicy.newBuilder()
.setMaxAttempts(10)
.setMaxAttempts(11)
.setExponentialBackoff(ExponentialBackoff.newBuilder()
.setMax(Durations.fromSeconds(2))
.setInitial(Durations.fromSeconds(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public void testSimpleConsumerToDLQ() throws Exception {
int maxDeliveryAttempts = 2;

SubscriptionGroupConfig groupConfig = brokerController1.getSubscriptionGroupManager().findSubscriptionGroupConfig(group);
groupConfig.setRetryMaxTimes(maxDeliveryAttempts);
groupConfig.setRetryMaxTimes(maxDeliveryAttempts - 1);
brokerController1.getSubscriptionGroupManager().updateSubscriptionGroupConfig(groupConfig);
brokerController2.getSubscriptionGroupManager().updateSubscriptionGroupConfig(groupConfig);
brokerController3.getSubscriptionGroupManager().updateSubscriptionGroupConfig(groupConfig);
Expand Down

0 comments on commit e5124e4

Please sign in to comment.