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); }