Skip to content

Commit

Permalink
chore: add retries to autobahn (denoland#21365)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Nov 28, 2023
1 parent bee1187 commit 4a2672b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion ext/websocket/autobahn/fuzzingclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,25 @@ const AUTOBAHN_TESTSUITE_DOCKER =

const self = Deno.execPath();
$`${self} run -A --unstable ${pwd}/autobahn_server.js`.spawn();
await $`docker run --name fuzzingserver -v ${pwd}/fuzzingclient.json:/fuzzingclient.json:ro -v ${pwd}/reports:/reports -p 9001:9001 --net=host --rm ${AUTOBAHN_TESTSUITE_DOCKER} wstest -m fuzzingclient -s fuzzingclient.json`

for (let i = 0; i < 6; i++) {
try {
await $`docker pull ${AUTOBAHN_TESTSUITE_DOCKER}`;
break;
} catch (e) {
$.logError(`error: docker pull failed ${e}, waiting 10s`);
await new Promise((r) => setTimeout(r, 10000));
}
}

await $`docker run
--name fuzzingserver
-v ${pwd}/fuzzingclient.json:/fuzzingclient.json:ro
-v ${pwd}/reports:/reports
-p 9001:9001
--net=host
--rm ${AUTOBAHN_TESTSUITE_DOCKER}
wstest -m fuzzingclient -s fuzzingclient.json`
.cwd(pwd);

const { deno_websocket } = JSON.parse(
Expand Down

0 comments on commit 4a2672b

Please sign in to comment.