You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2026/09/13 13:56:13 UTC

(juneau) branch master updated: WORK-J0533: coordinated OpenRewrite bump to plugin 6.46.1 and rewrite-java 8.90.4, and disable keep-alive on the MCP elicitation IT client to avoid the stale-socket CI flake.

This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 7bb3a545db WORK-J0533: coordinated OpenRewrite bump to plugin 6.46.1 and rewrite-java 8.90.4, and disable keep-alive on the MCP elicitation IT client to avoid the stale-socket CI flake.
7bb3a545db is described below

commit 7bb3a545dbb01c8e2635053247fe45116b8ecb05
Author: James Bognar <ja...@apache.org>
AuthorDate: Sun Sep 13 09:56:04 2026 -0400

    WORK-J0533: coordinated OpenRewrite bump to plugin 6.46.1 and rewrite-java 8.90.4, and disable keep-alive on the MCP elicitation IT client to avoid the stale-socket CI flake.
---
 .../mcp/v20260728/McpElicitationIntegration_Test.java  | 18 +++++++++++++++++-
 pom.xml                                                | 18 +++++++++++++++---
 2 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/juneau-integration-tests/src/test/java/org/apache/juneau/rest/client/mcp/v20260728/McpElicitationIntegration_Test.java b/juneau-integration-tests/src/test/java/org/apache/juneau/rest/client/mcp/v20260728/McpElicitationIntegration_Test.java
index bf7796597c..7782b6e920 100644
--- a/juneau-integration-tests/src/test/java/org/apache/juneau/rest/client/mcp/v20260728/McpElicitationIntegration_Test.java
+++ b/juneau-integration-tests/src/test/java/org/apache/juneau/rest/client/mcp/v20260728/McpElicitationIntegration_Test.java
@@ -28,6 +28,7 @@ import org.apache.juneau.commons.inject.*;
 import org.apache.juneau.marshall.json.*;
 import org.apache.juneau.marshall.marshaller.Json;
 import org.apache.juneau.microservice.*;
+import org.apache.juneau.rest.client.RestCallInterceptor;
 import org.apache.juneau.rest.server.*;
 import org.apache.juneau.rest.server.mcp.*;
 import org.apache.juneau.rest.server.mcp.v20260728.*;
@@ -123,11 +124,26 @@ class McpElicitationIntegration_Test extends TestBase {
 	static MicroserviceTestFixture fixture = MicroserviceTestFixture.create()
 		.configurations(FixtureConfig.class);
 
+	// Forces a fresh TCP connection per request instead of reusing a pooled keep-alive one: a client that
+	// issues two or more requests (pause then resume) can otherwise race the embedded Jetty fixture
+	// tearing down an idle pooled connection between calls. That surfaces as NoHttpResponseException /
+	// ApacheHc45Transport$StaleConnectionException on the elicitation resume POST. Resume is a mutating
+	// tools/call (requestState + ElicitAction, including cancel) and must not be replayed, so this test
+	// client disables keep-alive rather than retrying. Same interceptor as McpMrtrIntegration_Test.
+	private static final RestCallInterceptor CLOSE_CONNECTION_PER_REQUEST = new RestCallInterceptor() {
+		@Override public void onInit(org.apache.juneau.rest.client.RestRequest req) {
+			req.header("Connection", "close");
+		}
+	};
+
 	private static McpClient.Builder clientBuilder(boolean withElicitation) {
 		var caps = new ClientCapabilities();
 		if (withElicitation)
 			caps.setElicitation(new ElicitationCapability());
-		return McpClient.builder().endpoint(fixture.getRootUrl() + "/").clientCapabilities(caps);
+		return McpClient.builder()
+			.endpoint(fixture.getRootUrl() + "/")
+			.clientCapabilities(caps)
+			.interceptor(CLOSE_CONNECTION_PER_REQUEST);
 	}
 
 	/**
diff --git a/pom.xml b/pom.xml
index bd432d4aeb..b2e86c440e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -412,7 +412,8 @@
 				<plugin>
 					<groupId>org.openrewrite.maven</groupId>
 					<artifactId>rewrite-maven-plugin</artifactId>
-					<version>5.42.0</version>
+					<!-- 6.46.1 is the last 6.x on Maven Central; 6.47+ is Code Genome only. -->
+					<version>6.46.1</version>
 					<configuration>
 						<activeRecipes/>
 						<exportDatatables>false</exportDatatables>
@@ -421,12 +422,23 @@
 						<dependency>
 							<groupId>org.openrewrite</groupId>
 							<artifactId>rewrite-java</artifactId>
-							<version>8.38.0</version>
+							<version>8.90.4</version>
 						</dependency>
 						<dependency>
 							<groupId>org.openrewrite</groupId>
 							<artifactId>rewrite-java-17</artifactId>
-							<version>8.38.0</version>
+							<version>8.90.4</version>
+						</dependency>
+						<!-- Plugin 6.x also loads these parsers; pin with 8.90.4 so CI JDKs 21/25 are not mixed with 8.89.0. -->
+						<dependency>
+							<groupId>org.openrewrite</groupId>
+							<artifactId>rewrite-java-21</artifactId>
+							<version>8.90.4</version>
+						</dependency>
+						<dependency>
+							<groupId>org.openrewrite</groupId>
+							<artifactId>rewrite-java-25</artifactId>
+							<version>8.90.4</version>
 						</dependency>
 					</dependencies>
 				</plugin>