Skip to content

Commit

Permalink
Re-enable Jetty in spring-websocket tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoyanchev committed Sep 13, 2023
1 parent 5d45439 commit 29e3acc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,13 @@ public void initializeNativeSession(Session 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);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())));
}
Expand Down

0 comments on commit 29e3acc

Please sign in to comment.