Skip to content

Commit

Permalink
Set server on WebApplicationContext (#766)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored May 9, 2024
1 parent 5c2ef8c commit 4c06633
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ protected ServletContext createWebServer() throws Exception {
context.setClassLoader(getClass().getClassLoader());
context.setConfigurations(new Configuration[]{new WebXmlConfiguration()});
context.addBean(new NoListenerConfiguration(context));
context.setServer(server);
server.setHandler(context);
JettyWebSocketServletContainerInitializer.configure(context, null);
context.getSecurityHandler().setLoginService(configureUserRealm());
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/jvnet/hudson/test/JenkinsRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@ public static Server _createWebServer(
context.setClassLoader(classLoader);
context.setConfigurations(new Configuration[]{new WebXmlConfiguration()});
context.addBean(new NoListenerConfiguration(context));
context.setServer(server);
server.setHandler(context);
JettyWebSocketServletContainerInitializer.configure(context, null);
context.getSecurityHandler().setLoginService(loginServiceSupplier.get());
Expand Down

0 comments on commit 4c06633

Please sign in to comment.