Skip to content

Commit fd2ab47

Browse files
authored
devops: enable retries in Docker tests (#1834)
1 parent 2a6cdff commit fd2ab47

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/test_docker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
name: Test
2222
timeout-minutes: 120
2323
runs-on: ${{ matrix.runs-on }}
24+
env:
25+
PW_MAX_RETRIES: 3
2426
strategy:
2527
fail-fast: false
2628
matrix:
@@ -34,7 +36,7 @@ jobs:
3436
bash utils/docker/build.sh --$ARCH ${{ matrix.flavor }} playwright-java:localbuild-${{ matrix.flavor }}
3537
- name: Start container
3638
run: |
37-
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)
39+
CONTAINER_ID=$(docker run --rm -e CI -e PW_MAX_RETRIES --ipc=host -v "$(pwd)":/root/playwright --name playwright-docker-test -d -t playwright-java:localbuild-${{ matrix.flavor }} /bin/bash)
3840
echo "CONTAINER_ID=$CONTAINER_ID" >> $GITHUB_ENV
3941
4042
- name: Run test in container

tools/test-local-installation/pom.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,15 @@
6464
<plugin>
6565
<groupId>org.apache.maven.plugins</groupId>
6666
<artifactId>maven-surefire-plugin</artifactId>
67-
<version>3.2.5</version>
67+
<version>3.5.3</version>
68+
<configuration>
69+
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
70+
<failIfNoTests>false</failIfNoTests>
71+
<rerunFailingTestsCount>${env.PW_MAX_RETRIES}</rerunFailingTestsCount>
72+
<!-- Activate the use of TCP to transmit events to the plugin and avoid
73+
[WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM -->
74+
<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
75+
</configuration>
6876
</plugin>
6977
</plugins>
7078
</build>

0 commit comments

Comments
 (0)