Skip to content

Commit 5b33729

Browse files
authored
chore: reduce CI flakiness across webkit/macOS, ubuntu, windows (#1914)
1 parent b01bf64 commit 5b33729

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ jobs:
1818
matrix:
1919
os: [ubuntu-latest, windows-latest, macos-latest]
2020
browser: [chromium, firefox, webkit]
21+
exclude:
22+
# macos-latest is the free M1 runner (3 vCPU / 7 GB); WebKit needs more headroom.
23+
# Upstream's webkit matrix runs on macos-15-xlarge for the same reason.
24+
- os: macos-latest
25+
browser: webkit
26+
include:
27+
- os: macos-15-xlarge
28+
browser: webkit
2129
runs-on: ${{ matrix.os }}
2230
steps:
2331
- uses: actions/checkout@v6

playwright/src/test/java/com/microsoft/playwright/TestRouteWebSocket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ private void setupWS(Page target, Server server, int port, String binaryType) {
4545
}
4646
private void setupWS(Frame target, Server server, int port, String binaryType) {
4747
target.navigate(server.EMPTY_PAGE);
48+
// No 'error' listener: WebKit fires a spurious 'error' before 'close' on non-normal closures (e.g. 1008).
4849
target.evaluate("({ port, binaryType }) => {\n" +
4950
" window.log = [];\n" +
5051
" window.ws = new WebSocket('ws://localhost:' + port + '/ws');\n" +
5152
" window.ws.binaryType = binaryType;\n" +
5253
" window.ws.addEventListener('open', () => window.log.push('open'));\n" +
5354
" window.ws.addEventListener('close', event => window.log.push(`close code=${event.code} reason=${event.reason}`));\n" +
54-
" window.ws.addEventListener('error', event => window.log.push(`error`));\n" +
5555
" window.ws.addEventListener('message', async event => {\n" +
5656
" let data;\n" +
5757
" if (typeof event.data === 'string')\n" +

scripts/download_driver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ do
5050
if command -v wget &> /dev/null; then
5151
wget $URL
5252
else
53-
curl -O $URL
53+
curl --retry 5 --retry-delay 2 -fL -O $URL
5454
fi
5555
unzip $FILE_NAME -d .
5656
rm $FILE_NAME

0 commit comments

Comments
 (0)