From a7b5430f967fe54e4a91ada6fc5c89fe11f3f0a6 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 19 Jun 2019 12:24:03 +0200 Subject: [PATCH] fixed test to avoid local network fragility Signed-off-by: Greg Wilkins --- .../java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java index 5569a2c8a0e..9ae7684d594 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/rfcs/RFC2616BaseTest.java @@ -1062,12 +1062,10 @@ public abstract class RFC2616BaseTest { String specId; - String serverURI = server.getServerURI().toASCIIString(); - // HTTP/1.0 - StringBuffer req1 = new StringBuffer(); req1.append("GET /redirect/ HTTP/1.0\n"); + req1.append("Host: myhost:1234\n"); req1.append("Connection: Close\n"); req1.append("\n"); @@ -1075,7 +1073,7 @@ public abstract class RFC2616BaseTest specId = "10.3 Redirection HTTP/1.0 - basic"; assertThat(specId, response.getStatus(), is(HttpStatus.FOUND_302)); - assertEquals(serverURI + "/tests/", response.get("Location"),specId); + assertEquals("http://myhost:1234/tests/", response.get("Location"),specId); } /**