diff --git a/connectors/apache-connector/src/test/java/org/glassfish/jersey/apache/connector/HelloWorldTest.java b/connectors/apache-connector/src/test/java/org/glassfish/jersey/apache/connector/HelloWorldTest.java index 2c4a5b621ec..d4a7d70b462 100644 --- a/connectors/apache-connector/src/test/java/org/glassfish/jersey/apache/connector/HelloWorldTest.java +++ b/connectors/apache-connector/src/test/java/org/glassfish/jersey/apache/connector/HelloWorldTest.java @@ -33,6 +33,8 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.client.Client; import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.client.ClientRequestContext; +import jakarta.ws.rs.client.ClientRequestFilter; import jakarta.ws.rs.client.InvocationCallback; import jakarta.ws.rs.client.WebTarget; import jakarta.ws.rs.core.Application; @@ -182,11 +184,20 @@ public void testAsyncClientRequests() throws InterruptedException { cc.property(ApacheClientProperties.CONNECTION_MANAGER, connectionManager); cc.connectorProvider(new ApacheConnectorProvider()); Client client = ClientBuilder.newClient(cc); + client.register(new ClientRequestFilter() { + @Override + public void filter(ClientRequestContext requestContext) throws IOException { + Logger.getLogger(HelloWorldTest.class.getName()).info("Sending testAsyncClientRequest"); + Logger.getLogger(HelloWorldTest.class.getName()).info(Thread.currentThread().getClass().getName()); + Logger.getLogger(HelloWorldTest.class.getName()).info(Thread.currentThread().getName()); + } + }); WebTarget target = client.target(getBaseUri()); final int REQUESTS = 20; final CountDownLatch latch = new CountDownLatch(REQUESTS); final long tic = System.currentTimeMillis(); final Map results = new ConcurrentHashMap(); + Logger.getLogger(HelloWorldTest.class.getName()).info("Starting testAsyncClientRequests in:" + tic); for (int i = 0; i < REQUESTS; i++) { final int id = i; target.path(ROOT_PATH).request().async().get(new InvocationCallback() { @@ -197,6 +208,7 @@ public void completed(Response response) { results.put(id, result); } finally { latch.countDown(); + Logger.getLogger(HelloWorldTest.class.getName()).info("CountDown"); } } @@ -205,12 +217,15 @@ public void failed(Throwable error) { Logger.getLogger(HelloWorldTest.class.getName()).log(Level.SEVERE, "Failed on throwable", error); results.put(id, "error: " + error.getMessage()); latch.countDown(); + Logger.getLogger(HelloWorldTest.class.getName()).info("CountDown"); } }); } - assertTrue(latch.await(10 * getAsyncTimeoutMultiplier(), TimeUnit.SECONDS)); + boolean await = latch.await(10 * getAsyncTimeoutMultiplier(), TimeUnit.SECONDS); final long toc = System.currentTimeMillis(); Logger.getLogger(HelloWorldTest.class.getName()).info("Executed in: " + (toc - tic)); + Logger.getLogger(HelloWorldTest.class.getName()).info("Count is:" + latch.getCount()); + assertTrue(await); StringBuilder resultInfo = new StringBuilder("Results:\n"); for (int i = 0; i < REQUESTS; i++) { diff --git a/etc/jenkins/Jenkinsfile_ci_build b/etc/jenkins/Jenkinsfile_ci_build index cc3401fac91..5d84d41e757 100644 --- a/etc/jenkins/Jenkinsfile_ci_build +++ b/etc/jenkins/Jenkinsfile_ci_build @@ -8,21 +8,6 @@ pipeline { stages { stage('Jersey build') { parallel { - stage('JDK 11') { - agent { - label 'centos-7' - } - tools { - jdk 'openjdk-jdk11-latest' - maven 'apache-maven-latest' - } - steps { - sh ''' - bash ${WORKSPACE}/etc/jenkins/jenkins_build.sh - bash ${WORKSPACE}/etc/scripts/validation/dependency-convergence.sh - ''' - } - } stage('JDK 21') { agent { label 'centos-7'