Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: testAppendWhileShutdownSuccess race (#907)
* fix:testAppendWhileShutdownSuccess race

* .

* .
  • Loading branch information
yirutang committed Mar 3, 2021
1 parent 7c1bb12 commit d39443d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -924,7 +924,7 @@ public void onResponse(AppendRowsResponse response) {
IllegalStateException exception =
new IllegalStateException(
String.format(
"The append result offset %s does not match " + "the expected offset %s.",
"The append result offset %s does not match the expected offset %s.",
response.getAppendResult().getOffset().getValue(),
inflightBatch.getExpectedOffset()));
inflightBatch.onFailure(exception);
Expand Down
Expand Up @@ -678,6 +678,7 @@ public void testAppendWhileShutdownSuccess() throws Exception {
.toBuilder()
// When shutdown, we should have something in batch.
.setElementCountThreshold(3L)
.setDelayThreshold(Duration.ofSeconds(1000))
.setFlowControlSettings(
StreamWriter.Builder.DEFAULT_FLOW_CONTROL_SETTINGS
.toBuilder()
Expand Down Expand Up @@ -1072,6 +1073,7 @@ public void testOffset() throws Exception {
StreamWriter.Builder.DEFAULT_BATCHING_SETTINGS
.toBuilder()
.setElementCountThreshold(2L)
.setDelayThreshold(Duration.ofSeconds(1000))
.build())
.build()) {

Expand Down

0 comments on commit d39443d

Please sign in to comment.