Fix flakey test in HttpClientStreamableHttpTransportErrorHandlingTest (#535)

This commit is contained in:
Daniel Garnier-Moiroux 2025-09-04 12:55:26 +02:00 • committed by GitHub
commit 4d779e139c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,7 +63,7 @@ public class HttpClientStreamableHttpTransportErrorHandlingTest {
if ("DELETE".equals(httpExchange.getRequestMethod())) {
httpExchange.sendResponseHeaders(200, 0);
}
else {
else if ("POST".equals(httpExchange.getRequestMethod())) {
// Capture session ID from request if present
String requestSessionId = httpExchange.getRequestHeaders().getFirst(HttpHeaders.MCP_SESSION_ID);
lastReceivedSessionId.set(requestSessionId);