Skip to content

Commit

Permalink
Run WebServer once per class instead of method (#1903)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperxpro committed Sep 3, 2023
1 parent b735dbb commit 745a7bc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.AbstractHandler;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.TestInstance;
import org.slf4j.Logger;
Expand All @@ -36,7 +38,7 @@ public abstract class AbstractBasicTest {
protected int port1 = -1;
protected int port2 = -1;

@BeforeEach
@BeforeAll
public void setUpGlobal() throws Exception {
server = new Server();
ServerConnector connector1 = addHttpConnector(server);
Expand All @@ -50,7 +52,7 @@ public void setUpGlobal() throws Exception {
logger.info("Local HTTP server started successfully");
}

@AfterEach
@AfterAll
public void tearDownGlobal() throws Exception {
logger.debug("Shutting down local server: {}", server);

Expand Down

0 comments on commit 745a7bc

Please sign in to comment.