Merge pull request #6171 from eclipse/jetty-10.0.x-WebSocket-DisabledSessionTest

Re-enable disabled tests for the WebSocket SessionTest
This commit is contained in:
Lachlan 2021-04-15 20:13:33 +10:00 committed by GitHub
commit 054069fa59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 25 deletions

View File

@ -37,7 +37,6 @@ import org.eclipse.jetty.websocket.core.OpCode;
import org.eclipse.jetty.websocket.javax.tests.Fuzzer; import org.eclipse.jetty.websocket.javax.tests.Fuzzer;
import org.eclipse.jetty.websocket.javax.tests.LocalServer; import org.eclipse.jetty.websocket.javax.tests.LocalServer;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.MethodSource;
@ -62,11 +61,7 @@ public class SessionTest
else else
{ {
ret.append('[').append(pathParams.size()).append(']'); ret.append('[').append(pathParams.size()).append(']');
List<String> keys = new ArrayList<>(); List<String> keys = new ArrayList<>(pathParams.keySet());
for (String key : pathParams.keySet())
{
keys.add(key);
}
Collections.sort(keys); Collections.sort(keys);
for (String key : keys) for (String key : keys)
{ {
@ -126,11 +121,7 @@ public class SessionTest
else else
{ {
ret.append('[').append(pathParams.size()).append(']'); ret.append('[').append(pathParams.size()).append(']');
List<String> keys = new ArrayList<>(); List<String> keys = new ArrayList<>(pathParams.keySet());
for (String key : pathParams.keySet())
{
keys.add(key);
}
Collections.sort(keys); Collections.sort(keys);
for (String key : keys) for (String key : keys)
{ {
@ -227,14 +218,13 @@ public class SessionTest
container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/info/{a}/{b}/").build()); container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/info/{a}/{b}/").build());
container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/info/{a}/{b}/{c}/").build()); container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/info/{a}/{b}/{c}/").build());
container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/info/{a}/{b}/{c}/{d}/").build()); container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/info/{a}/{b}/{c}/{d}/").build());
/*
endpointClass = SessionInfoEndpoint.class; endpointClass = SessionInfoEndpoint.class;
container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass,"/einfo/").build()); container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/einfo/").build());
container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass,"/einfo/{a}/").build()); container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/einfo/{a}/").build());
container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass,"/einfo/{a}/{b}/").build()); container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/einfo/{a}/{b}/").build());
container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass,"/einfo/{a}/{b}/{c}/").build()); container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/einfo/{a}/{b}/{c}/").build());
container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass,"/einfo/{a}/{b}/{c}/{d}/").build()); container.addEndpoint(ServerEndpointConfig.Builder.create(endpointClass, "/einfo/{a}/{b}/{c}/{d}/").build());
*/
} }
private void assertResponse(String requestPath, String requestMessage, private void assertResponse(String requestPath, String requestMessage,
@ -293,7 +283,6 @@ public class SessionTest
@ParameterizedTest(name = "{0}") @ParameterizedTest(name = "{0}")
@MethodSource("data") @MethodSource("data")
@Disabled
public void testPathParamsEndpointEmpty(Case testCase) throws Exception public void testPathParamsEndpointEmpty(Case testCase) throws Exception
{ {
setup(testCase); setup(testCase);
@ -303,7 +292,6 @@ public class SessionTest
@ParameterizedTest(name = "{0}") @ParameterizedTest(name = "{0}")
@MethodSource("data") @MethodSource("data")
@Disabled
public void testPathParamsEndpointSingle(Case testCase) throws Exception public void testPathParamsEndpointSingle(Case testCase) throws Exception
{ {
setup(testCase); setup(testCase);
@ -313,7 +301,6 @@ public class SessionTest
@ParameterizedTest(name = "{0}") @ParameterizedTest(name = "{0}")
@MethodSource("data") @MethodSource("data")
@Disabled
public void testPathParamsEndpointDouble(Case testCase) throws Exception public void testPathParamsEndpointDouble(Case testCase) throws Exception
{ {
setup(testCase); setup(testCase);
@ -323,7 +310,6 @@ public class SessionTest
@ParameterizedTest(name = "{0}") @ParameterizedTest(name = "{0}")
@MethodSource("data") @MethodSource("data")
@Disabled
public void testPathParamsEndpointTriple(Case testCase) throws Exception public void testPathParamsEndpointTriple(Case testCase) throws Exception
{ {
setup(testCase); setup(testCase);
@ -363,7 +349,6 @@ public class SessionTest
@ParameterizedTest(name = "{0}") @ParameterizedTest(name = "{0}")
@MethodSource("data") @MethodSource("data")
@Disabled
public void testRequestUriEndpointBasic(Case testCase) throws Exception public void testRequestUriEndpointBasic(Case testCase) throws Exception
{ {
setup(testCase); setup(testCase);
@ -373,7 +358,6 @@ public class SessionTest
@ParameterizedTest(name = "{0}") @ParameterizedTest(name = "{0}")
@MethodSource("data") @MethodSource("data")
@Disabled
public void testRequestUriEndpointWithPathParam(Case testCase) throws Exception public void testRequestUriEndpointWithPathParam(Case testCase) throws Exception
{ {
setup(testCase); setup(testCase);
@ -383,7 +367,6 @@ public class SessionTest
@ParameterizedTest(name = "{0}") @ParameterizedTest(name = "{0}")
@MethodSource("data") @MethodSource("data")
@Disabled
public void testRequestUriEndpointWithPathParamWithQuery(Case testCase) throws Exception public void testRequestUriEndpointWithPathParamWithQuery(Case testCase) throws Exception
{ {
setup(testCase); setup(testCase);