Skip to content

Commit f5d66ba

Browse files
ludochgae-java-bot
authored andcommitted
Remove Jetty 9.4 specific handling for RemoteAddressTest.
PiperOrigin-RevId: 901633046 Change-Id: If90014a70a9fa0c407f405a96c19ceca9c6f4030
1 parent 8233aec commit f5d66ba

1 file changed

Lines changed: 8 additions & 13 deletions

File tree

runtime/test/src/test/java/com/google/apphosting/runtime/jetty9/RemoteAddressTest.java

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,14 @@ public void testWithIPv6() throws Exception {
135135
.send();
136136
assertThat(response.getStatus(), equalTo(HttpStatus.OK_200));
137137
contentReceived = response.getContentAsString();
138-
if (jettyVersion.equals("9.4")) {
139-
assertThat(
140-
contentReceived, containsString("getRemoteAddr: [2001:db8:85a3:8d3:1319:8a2e:370:7348]"));
141-
assertThat(
142-
contentReceived, containsString("getRemoteHost: [2001:db8:85a3:8d3:1319:8a2e:370:7348]"));
143-
} else {
144-
// The correct behaviour for getRemoteAddr and getRemoteHost is to not include []
145-
// because they return raw IP/hostname and not URI-formatted addresses.
146-
assertThat(
147-
contentReceived, containsString("getRemoteAddr: 2001:db8:85a3:8d3:1319:8a2e:370:7348"));
148-
assertThat(
149-
contentReceived, containsString("getRemoteHost: 2001:db8:85a3:8d3:1319:8a2e:370:7348"));
150-
}
138+
139+
// The correct behaviour for getRemoteAddr and getRemoteHost is to not include []
140+
// because they return raw IP/hostname and not URI-formatted addresses.
141+
assertThat(
142+
contentReceived, containsString("getRemoteAddr: 2001:db8:85a3:8d3:1319:8a2e:370:7348"));
143+
assertThat(
144+
contentReceived, containsString("getRemoteHost: 2001:db8:85a3:8d3:1319:8a2e:370:7348"));
145+
151146
assertThat(contentReceived, containsString("getRemotePort: 0"));
152147
assertThat(contentReceived, containsString("getLocalAddr: 0.0.0.0"));
153148
assertThat(contentReceived, containsString("getLocalName: 0.0.0.0"));

0 commit comments

Comments
 (0)