Skip to content

Commit

Permalink
Increase timeout in ZipkinWebClientSenderTests
Browse files Browse the repository at this point in the history
  • Loading branch information
philwebb committed Oct 23, 2024
1 parent 9210b3b commit fc1ed0b
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
@SuppressWarnings({ "deprecation", "removal" })
class ZipkinWebClientSenderTests extends ZipkinHttpSenderTests {

private static final Duration TIMEOUT = Duration.ofSeconds(30);

private static ClearableDispatcher dispatcher;

private static MockWebServer mockBackEnd;
Expand Down Expand Up @@ -81,7 +83,7 @@ void beforeEach() {

@Override
BytesMessageSender createSender() {
return createSender(Encoding.JSON, Duration.ofSeconds(10));
return createSender(Encoding.JSON, TIMEOUT);
}

ZipkinWebClientSender createSender(Encoding encoding, Duration timeout) {
Expand Down Expand Up @@ -110,7 +112,7 @@ void sendShouldSendSpansToZipkin() throws IOException, InterruptedException {
void sendShouldSendSpansToZipkinInProto3() throws IOException, InterruptedException {
mockBackEnd.enqueue(new MockResponse());
List<byte[]> encodedSpans = List.of(toByteArray("span1"), toByteArray("span2"));
try (BytesMessageSender sender = createSender(Encoding.PROTO3, Duration.ofSeconds(10))) {
try (BytesMessageSender sender = createSender(Encoding.PROTO3, TIMEOUT)) {
sender.send(encodedSpans);
}
requestAssertions((request) -> {
Expand All @@ -125,8 +127,7 @@ void sendUsesDynamicEndpoint() throws Exception {
mockBackEnd.enqueue(new MockResponse());
mockBackEnd.enqueue(new MockResponse());
try (HttpEndpointSupplier httpEndpointSupplier = new TestHttpEndpointSupplier(ZIPKIN_URL)) {
try (BytesMessageSender sender = createSender((endpoint) -> httpEndpointSupplier, Encoding.JSON,
Duration.ofSeconds(10))) {
try (BytesMessageSender sender = createSender((endpoint) -> httpEndpointSupplier, Encoding.JSON, TIMEOUT)) {
sender.send(Collections.emptyList());
sender.send(Collections.emptyList());
}
Expand Down

0 comments on commit fc1ed0b

Please sign in to comment.