Skip to content

Commit fc1ed0b

Browse files
committed
Increase timeout in ZipkinWebClientSenderTests
1 parent 9210b3b commit fc1ed0b

File tree

1 file changed

+5
-4
lines changed
  • spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin

1 file changed

+5
-4
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinWebClientSenderTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
@SuppressWarnings({ "deprecation", "removal" })
5252
class ZipkinWebClientSenderTests extends ZipkinHttpSenderTests {
5353

54+
private static final Duration TIMEOUT = Duration.ofSeconds(30);
55+
5456
private static ClearableDispatcher dispatcher;
5557

5658
private static MockWebServer mockBackEnd;
@@ -81,7 +83,7 @@ void beforeEach() {
8183

8284
@Override
8385
BytesMessageSender createSender() {
84-
return createSender(Encoding.JSON, Duration.ofSeconds(10));
86+
return createSender(Encoding.JSON, TIMEOUT);
8587
}
8688

8789
ZipkinWebClientSender createSender(Encoding encoding, Duration timeout) {
@@ -110,7 +112,7 @@ void sendShouldSendSpansToZipkin() throws IOException, InterruptedException {
110112
void sendShouldSendSpansToZipkinInProto3() throws IOException, InterruptedException {
111113
mockBackEnd.enqueue(new MockResponse());
112114
List<byte[]> encodedSpans = List.of(toByteArray("span1"), toByteArray("span2"));
113-
try (BytesMessageSender sender = createSender(Encoding.PROTO3, Duration.ofSeconds(10))) {
115+
try (BytesMessageSender sender = createSender(Encoding.PROTO3, TIMEOUT)) {
114116
sender.send(encodedSpans);
115117
}
116118
requestAssertions((request) -> {
@@ -125,8 +127,7 @@ void sendUsesDynamicEndpoint() throws Exception {
125127
mockBackEnd.enqueue(new MockResponse());
126128
mockBackEnd.enqueue(new MockResponse());
127129
try (HttpEndpointSupplier httpEndpointSupplier = new TestHttpEndpointSupplier(ZIPKIN_URL)) {
128-
try (BytesMessageSender sender = createSender((endpoint) -> httpEndpointSupplier, Encoding.JSON,
129-
Duration.ofSeconds(10))) {
130+
try (BytesMessageSender sender = createSender((endpoint) -> httpEndpointSupplier, Encoding.JSON, TIMEOUT)) {
130131
sender.send(Collections.emptyList());
131132
sender.send(Collections.emptyList());
132133
}

0 commit comments

Comments
 (0)