Skip to content
Permalink
Browse files
fix: testAppendWhileShutdownSuccess race (#907)
* fix:testAppendWhileShutdownSuccess race

* .

* .
  • Loading branch information
yirutang committed Mar 3, 2021
1 parent 7c1bb12 commit d39443d51d2625e4b3aee59d1e593229e9e449d3
@@ -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);
@@ -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()
@@ -1072,6 +1073,7 @@ public void testOffset() throws Exception {
StreamWriter.Builder.DEFAULT_BATCHING_SETTINGS
.toBuilder()
.setElementCountThreshold(2L)
.setDelayThreshold(Duration.ofSeconds(1000))
.build())
.build()) {

0 comments on commit d39443d

Please sign in to comment.