1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

chore: add retries to autobahn (#21365)

This commit is contained in:
Matt Mastracci 2023-11-27 18:44:48 -07:00 committed by GitHub
parent bee1187093
commit 4a2672bc29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(