From 59a9a0114aaf7bb5612ccc0d64cbc4cf4296fa58 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 12 Sep 2018 16:55:01 -0500 Subject: [PATCH] More junit5 test fixes Signed-off-by: Joakim Erdfelt --- .../tests/server/AbstractLocalServerCase.java | 12 ++++-------- .../jetty/websocket/tests/server/BinaryTest.java | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/jetty-websocket/websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/AbstractLocalServerCase.java b/jetty-websocket/websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/AbstractLocalServerCase.java index b29e5031a21..c8c2027b69c 100644 --- a/jetty-websocket/websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/AbstractLocalServerCase.java +++ b/jetty-websocket/websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/AbstractLocalServerCase.java @@ -43,10 +43,8 @@ import org.eclipse.jetty.websocket.tests.DataUtils; import org.eclipse.jetty.websocket.tests.SimpleServletServer; import org.eclipse.jetty.websocket.tests.UnitGenerator; import org.eclipse.jetty.websocket.tests.servlets.EchoServlet; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.rules.TestName; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; /** * Testing against local websocket server using {@link org.eclipse.jetty.server.LocalConnector} @@ -68,8 +66,6 @@ public abstract class AbstractLocalServerCase protected static SimpleServletServer server; protected final Logger LOG; - @Rule - public TestName testname = new TestName(); public UnitGenerator generator = new UnitGenerator(WebSocketPolicy.newClientPolicy()); public AbstractLocalServerCase() @@ -77,14 +73,14 @@ public abstract class AbstractLocalServerCase LOG = Log.getLogger(this.getClass().getName()); } - @BeforeClass + @BeforeAll public static void startServer() throws Exception { server = new SimpleServletServer(new EchoServlet()); server.start(); } - @AfterClass + @AfterAll public static void stopServer() throws Exception { server.stop(); diff --git a/jetty-websocket/websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/BinaryTest.java b/jetty-websocket/websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/BinaryTest.java index fcd01237b2f..0cc1b888e60 100644 --- a/jetty-websocket/websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/BinaryTest.java +++ b/jetty-websocket/websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/BinaryTest.java @@ -30,7 +30,7 @@ import org.eclipse.jetty.websocket.common.WebSocketFrame; import org.eclipse.jetty.websocket.common.frames.BinaryFrame; import org.eclipse.jetty.websocket.tests.DataUtils; import org.eclipse.jetty.websocket.tests.LocalFuzzer; -import org.junit.Test; +import org.junit.jupiter.api.Test; /** * Binary message / frame tests