File tree Expand file tree Collapse file tree 5 files changed +22
-101
lines changed
src/main/java/com/microsoft/playwright/springboottest
src/main/java/com/microsoft/playwright/springboottest Expand file tree Collapse file tree 5 files changed +22
-101
lines changed Original file line number Diff line number Diff line change 4141 BROWSER : ${{ matrix.browser }}
4242 run : |
4343 CONTAINER_ID="$(docker run --rm -e CI --ipc=host -v $(pwd):/root/playwright --name playwright-docker-test -d -t playwright-java:localbuild-${{ matrix.flavor }} /bin/bash)"
44- docker exec "${CONTAINER_ID}" /root/playwright/tools/test-spring-classloader/package_and_run_classloader_test .sh
44+ docker exec "${CONTAINER_ID}" /root/playwright/tools/test-spring-boot-starter/package_and_run_async_test .sh
Original file line number Diff line number Diff line change 55
66cd " $( dirname " $0 " ) "
77mvn package -D skipTests --no-transfer-progress
8- java -jar target/test-spring-classloader * .jar
8+ java -jar target/test-spring-boot-starter * .jar --async
Original file line number Diff line number Diff line change 55import org .springframework .boot .SpringApplication ;
66import org .springframework .boot .autoconfigure .SpringBootApplication ;
77
8+ import java .util .concurrent .CompletableFuture ;
9+
810@ SpringBootApplication
911public class TestApp implements CommandLineRunner {
1012
@@ -14,6 +16,24 @@ public static void main(String[] args) {
1416
1517 @ Override
1618 public void run (String ... args ) {
19+ if (args .length == 0 ) {
20+ runSync ();
21+ } else {
22+ if ("--async" .equals (args [0 ])) {
23+ runAsync ();
24+ }
25+ else {
26+ runSync ();
27+ }
28+ }
29+ }
30+
31+ private void runAsync () {
32+ CompletableFuture <Void > voidCompletableFuture = CompletableFuture .runAsync (this ::runSync );
33+ voidCompletableFuture .join ();
34+ }
35+
36+ private void runSync () {
1737 try (Playwright playwright = Playwright .create ()) {
1838 BrowserType browserType = getBrowserTypeFromEnv (playwright );
1939 System .out .println ("Running test with " + browserType .name ());
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments