From 7d96219960a61970144686e78b7932d1423e4fe3 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Wed, 13 Dec 2023 12:12:48 +0700 Subject: [PATCH] Attempts to deflake postSpans_disconnectDuringBody Signed-off-by: Adrian Cole --- .../src/test/java/zipkin2/junit5/ZipkinExtensionTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zipkin-junit5/src/test/java/zipkin2/junit5/ZipkinExtensionTest.java b/zipkin-junit5/src/test/java/zipkin2/junit5/ZipkinExtensionTest.java index b857493d1d2..1f132934402 100644 --- a/zipkin-junit5/src/test/java/zipkin2/junit5/ZipkinExtensionTest.java +++ b/zipkin-junit5/src/test/java/zipkin2/junit5/ZipkinExtensionTest.java @@ -127,6 +127,9 @@ void getTraces_storedViaPostVersion2(String mediaType, SpanBytesEncoder encoder) // Zipkin didn't store the spans, as they shouldn't have been readable, due to disconnect assertThat(zipkin.getTraces()).isEmpty(); + // create a new connection pool to avoid flakey tests + client = new OkHttpClient(); + // The failure shouldn't affect later requests assertPostSpansV1Success(spans); }