This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit c2eeed8880886e2fe06c65e6836cc913bdef0b8d Author: Andriy Redko <[email protected]> AuthorDate: Sat Jun 15 16:54:25 2024 -0400 Fix unstable JAXRS20ClientServerBookTest::testGetGenericBookSingleClientInParallel test case (cherry picked from commit be13c31b5852a59a033990abbddc9be20e201b62) # Conflicts: # coverage/pom.xml --- .../cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java index 00ba20c0db..bfb350b5ca 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java @@ -244,18 +244,14 @@ public class JAXRS20ClientServerBookTest extends AbstractBusClientServerTestBase } pool.shutdown(); - if (pool.awaitTermination(2, TimeUnit.MINUTES)) { - // Since JDK-21, HttpClient Implements AutoCloseable - if (Runtime.version().feature() > 21) { - assertThat(captureHttpClientThreads.get(), equalTo(httpClientThreads)); - } + // Since JDK-21, HttpClient Implements AutoCloseable + if (pool.awaitTermination(2, TimeUnit.MINUTES) && Runtime.version().feature() > 21) { + assertThat(captureHttpClientThreads.get(), equalTo(httpClientThreads)); } else { pool.shutdownNow(); - if (pool.awaitTermination(2, TimeUnit.MINUTES)) { - // Since JDK-21, HttpClient Implements AutoCloseable - if (Runtime.version().feature() > 21) { - assertThat(captureHttpClientThreads.get(), equalTo(httpClientThreads)); - } + // Since JDK-21, HttpClient Implements AutoCloseable + if (pool.awaitTermination(2, TimeUnit.MINUTES) && Runtime.version().feature() > 21) { + assertThat(captureHttpClientThreads.get(), equalTo(httpClientThreads)); } } }
