Re-enable Jetty in spring-websocket tests

This commit is contained in:
rstoyanchev 2023-09-13 08:53:19 +01:00
parent 5d454390f0
commit 29e3acc887
2 changed files with 8 additions and 1 deletions

View File

@ -191,7 +191,13 @@ public class JettyWebSocketSession extends AbstractWebSocketSession<Session> {
this.extensions = getExtensions(session);
if (this.user == null) {
this.user = session.getUpgradeRequest().getUserPrincipal();
try {
this.user = session.getUpgradeRequest().getUserPrincipal();
}
catch (NullPointerException ex) {
// Necessary until https://github.com/eclipse/jetty.project/issues/10498 is resolved
logger.error("Failure from UpgradeRequest while getting Principal", ex);
}
}
}

View File

@ -62,6 +62,7 @@ public abstract class AbstractWebSocketIntegrationTests {
static Stream<Arguments> argumentsFactory() {
return Stream.of(
arguments(named("Jetty", new JettyWebSocketTestServer()), named("Standard", new StandardWebSocketClient())),
arguments(named("Tomcat", new TomcatWebSocketTestServer()), named("Standard", new StandardWebSocketClient())),
arguments(named("Undertow", new UndertowTestServer()), named("Standard", new StandardWebSocketClient())));
}