mirror of
https://github.com/microsoft/playwright-java.git
synced 2025-09-08 21:01:00 +00:00
chore(test): dont throw in tear down if setup failed (#118)
This commit is contained in:
parent
fa2e0f0237
commit
4b33bd6704
@ -87,9 +87,11 @@ public class TestBase {
|
||||
|
||||
@AfterAll
|
||||
static void closeBrowser() {
|
||||
if (browser != null) {
|
||||
browser.close();
|
||||
browser = null;
|
||||
}
|
||||
}
|
||||
|
||||
@BeforeAll
|
||||
static void startServer() throws IOException {
|
||||
@ -99,17 +101,23 @@ public class TestBase {
|
||||
|
||||
@AfterAll
|
||||
static void stopServer() throws IOException {
|
||||
if (server != null) {
|
||||
server.stop();
|
||||
server = null;
|
||||
}
|
||||
if (httpsServer != null) {
|
||||
httpsServer.stop();
|
||||
httpsServer = null;
|
||||
}
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
static void closePlaywright() throws Exception {
|
||||
if (playwright != null) {
|
||||
playwright.close();
|
||||
playwright = null;
|
||||
}
|
||||
}
|
||||
|
||||
BrowserContext createContext() {
|
||||
return browser.newContext();
|
||||
|
Loading…
x
Reference in New Issue
Block a user