Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure done before checking success to help troubleshoot timeout issues #4833

Merged
merged 3 commits into from Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -120,6 +120,10 @@ private static <T> void testRetryableStatusCodes(

CompletableResultCode resultCode =
exporter.apply(dataSupplier.get()).join(10, TimeUnit.SECONDS);
assertThat(resultCode.isDone())
.as("Exporter didn't complete in time. Consider increasing join timeout?")
.isTrue();
breedx-splk marked this conversation as resolved.
Show resolved Hide resolved

boolean retryable =
RetryUtil.retryableGrpcStatusCodes().contains(String.valueOf(code.value()));
boolean expectedResult = retryable || code == Status.Code.OK;
Expand Down Expand Up @@ -152,6 +156,9 @@ private static <T> void testDefaultRetryPolicy(
// Result should be failure, sever should have received maxAttempts requests
CompletableResultCode resultCode =
exporter.apply(dataSupplier.get()).join(10, TimeUnit.SECONDS);
assertThat(resultCode.isDone())
.as("Exporter didn't complete in time. Consider increasing join timeout?")
.isTrue();
assertThat(resultCode.isSuccess()).isFalse();
assertThat(serverRequestCountSupplier.get()).isEqualTo(maxAttempts);
}
Expand Down
Expand Up @@ -129,6 +129,10 @@ private static <T> void testRetryableStatusCodes(

CompletableResultCode resultCode =
exporter.apply(dataSupplier.get()).join(10, TimeUnit.SECONDS);
assertThat(resultCode.isDone())
.as("Exporter didn't complete in time. Consider increasing join timeout?")
.isTrue();

boolean retryable = code != 200 && RetryUtil.retryableHttpResponseCodes().contains(code);
boolean expectedResult = retryable || code == 200;
assertThat(resultCode.isSuccess())
Expand Down Expand Up @@ -159,6 +163,9 @@ private static <T> void testDefaultRetryPolicy(
// Result should be failure, sever should have received maxAttempts requests
CompletableResultCode resultCode =
exporter.apply(dataSupplier.get()).join(10, TimeUnit.SECONDS);
assertThat(resultCode.isDone())
.as("Exporter didn't complete in time. Consider increasing join timeout?")
.isTrue();
assertThat(resultCode.isSuccess()).isFalse();
assertThat(serverRequestCountSupplier.get()).isEqualTo(maxAttempts);
}
Expand Down