fix JettyWebSocketFilterTest in ee9-websocket

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2022-06-27 17:31:39 +10:00
parent bfaf0facb5
commit b1a1a60994
4 changed files with 7 additions and 10 deletions

View File

@ -38,8 +38,8 @@ public class JettyWebSocketConfiguration extends AbstractConfiguration
addDependents("org.eclipse.jetty.ee9.annotations.AnnotationConfiguration", WebAppConfiguration.class.getName());
protectAndExpose("org.eclipse.jetty.ee9.websocket.api.");
protectAndExpose("org.eclipse.jetty.websocket.server.");
protectAndExpose("org.eclipse.jetty.websocket.servlet."); // For WebSocketUpgradeFilter
protectAndExpose("org.eclipse.jetty.ee9.websocket.server.");
protectAndExpose("org.eclipse.jetty.ee9.websocket.servlet."); // For WebSocketUpgradeFilter
hide("org.eclipse.jetty.server.internal.");
hide("org.eclipse.jetty.server.config.");
}

View File

@ -49,7 +49,6 @@ import org.eclipse.jetty.util.component.AbstractLifeCycle;
import org.eclipse.jetty.websocket.core.WebSocketConstants;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import static org.hamcrest.MatcherAssert.assertThat;
@ -304,7 +303,6 @@ public class JettyWebSocketFilterTest
assertThat(socket.textMessages.poll(), is("hElLo wOrLd"));
}
@Disabled
@Test
public void testDefaultWebSocketUpgradeFilterOrdering() throws Exception
{
@ -339,7 +337,6 @@ public class JettyWebSocketFilterTest
assertThat(socket.textMessages.poll(), is(defaultIdleTimeout));
}
@Disabled
@Test
public void testWebSocketUpgradeFilterOrdering() throws Exception
{

View File

@ -8,7 +8,7 @@
<filter>
<filter-name>wsuf-alt</filter-name>
<filter-class>org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter</filter-class>
<filter-class>org.eclipse.jetty.ee9.websocket.servlet.WebSocketUpgradeFilter</filter-class>
<init-param>
<param-name>idleTimeout</param-name>
<param-value>5999</param-value>

View File

@ -9,7 +9,7 @@
<!-- Add the custom filter first. -->
<filter>
<filter-name>wsuf-alt</filter-name>
<filter-class>org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter</filter-class>
<filter-class>org.eclipse.jetty.ee9.websocket.servlet.WebSocketUpgradeFilter</filter-class>
<init-param>
<param-name>idleTimeout</param-name>
<param-value>5999</param-value>
@ -22,11 +22,11 @@
<!-- The default filter is overridden so it is tried after. -->
<filter>
<filter-name>org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter</filter-name>
<filter-class>org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter</filter-class>
<filter-name>org.eclipse.jetty.ee9.websocket.servlet.WebSocketUpgradeFilter</filter-name>
<filter-class>org.eclipse.jetty.ee9.websocket.servlet.WebSocketUpgradeFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter</filter-name>
<filter-name>org.eclipse.jetty.ee9.websocket.servlet.WebSocketUpgradeFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>