Skip to content

Commit 252b462

Browse files
committed
Add a /quitquitquit endpoint to the test server to make killing it easy
1 parent 015595d commit 252b462

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

java/test/org/openqa/selenium/environment/webserver/HandlersForTests.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ public HandlersForTests(String hostname, int port, Path tempPageDir) {
7171
Route.matching(req -> req.getUri().startsWith("/utf8/"))
7272
.to(() -> new Utf8Handler(webSrc, "/utf8/")),
7373
Route.prefix(TEMP_SRC_CONTEXT_PATH).to(Route.combine(generatedPages)),
74+
Route.get("/quitquitquit")
75+
.to(
76+
() ->
77+
req -> {
78+
System.exit(0);
79+
return new HttpResponse();
80+
}),
7481
new CommonWebResources());
7582

7683
delegate = Route.combine(route, Route.prefix("/common").to(route));

0 commit comments

Comments
 (0)