Skip to content

Commit 505e38a

Browse files
committed
no longer use beforeeach
1 parent d41630d commit 505e38a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/java/org/java_websocket/misc/OpeningHandshakeRejectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public class OpeningHandshakeRejectionTest {
5252

5353
private static final String additionalHandshake = "Upgrade: websocket\r\nConnection: Upgrade\r\n\r\n";
5454

55-
@BeforeEach
5655
public void startServer() throws InterruptedException {
5756
this.port = SocketUtil.getAvailablePort();
5857
this.thread = new Thread(
@@ -221,6 +220,7 @@ public void testHandshakeRejectionTestCase11() throws Exception {
221220
testHandshakeRejection(11);
222221
}
223222
private void testHandshakeRejection(int i) throws Exception {
223+
startServer();
224224
this.serverStartCountDownLatch.await();
225225
final int finalI = i;
226226
final CountDownLatch countDownLatch = new CountDownLatch(1);

src/test/java/org/java_websocket/protocols/ProtocolHandshakeRejectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public class ProtocolHandshakeRejectionTest {
5858

5959
private int port = -1;
6060

61-
@BeforeEach
6261
public void startServer() throws InterruptedException {
6362
port = SocketUtil.getAvailablePort();
6463
thread = new Thread(
@@ -491,6 +490,7 @@ public void testHandshakeRejectionTestCase29() throws Exception {
491490
}
492491

493492
private void testProtocolRejection(int i, Draft_6455 draft) throws Exception {
493+
startServer();
494494
serverStartCountDownLatch.await();
495495
final int finalI = i;
496496
final CountDownLatch countDownLatch = new CountDownLatch(1);

0 commit comments

Comments
 (0)