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()); addDependents("org.eclipse.jetty.ee9.annotations.AnnotationConfiguration", WebAppConfiguration.class.getName());
protectAndExpose("org.eclipse.jetty.ee9.websocket.api."); protectAndExpose("org.eclipse.jetty.ee9.websocket.api.");
protectAndExpose("org.eclipse.jetty.websocket.server."); protectAndExpose("org.eclipse.jetty.ee9.websocket.server.");
protectAndExpose("org.eclipse.jetty.websocket.servlet."); // For WebSocketUpgradeFilter protectAndExpose("org.eclipse.jetty.ee9.websocket.servlet."); // For WebSocketUpgradeFilter
hide("org.eclipse.jetty.server.internal."); hide("org.eclipse.jetty.server.internal.");
hide("org.eclipse.jetty.server.config."); 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.eclipse.jetty.websocket.core.WebSocketConstants;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
@ -304,7 +303,6 @@ public class JettyWebSocketFilterTest
assertThat(socket.textMessages.poll(), is("hElLo wOrLd")); assertThat(socket.textMessages.poll(), is("hElLo wOrLd"));
} }
@Disabled
@Test @Test
public void testDefaultWebSocketUpgradeFilterOrdering() throws Exception public void testDefaultWebSocketUpgradeFilterOrdering() throws Exception
{ {
@ -339,7 +337,6 @@ public class JettyWebSocketFilterTest
assertThat(socket.textMessages.poll(), is(defaultIdleTimeout)); assertThat(socket.textMessages.poll(), is(defaultIdleTimeout));
} }
@Disabled
@Test @Test
public void testWebSocketUpgradeFilterOrdering() throws Exception public void testWebSocketUpgradeFilterOrdering() throws Exception
{ {

View File

@ -8,7 +8,7 @@
<filter> <filter>
<filter-name>wsuf-alt</filter-name> <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> <init-param>
<param-name>idleTimeout</param-name> <param-name>idleTimeout</param-name>
<param-value>5999</param-value> <param-value>5999</param-value>

View File

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