diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-11-27 18:44:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-28 01:44:48 +0000 |
commit | 4a2672bc29f878eea5ed2310806d630c270c6990 (patch) | |
tree | 0f864af5a0c62c802468901a349c5ffde4ccf786 /ext/websocket/autobahn/fuzzingclient.js | |
parent | bee1187093e6257570e2afd0684eb082d72bb744 (diff) |
chore: add retries to autobahn (#21365)
Diffstat (limited to 'ext/websocket/autobahn/fuzzingclient.js')
-rw-r--r-- | ext/websocket/autobahn/fuzzingclient.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/ext/websocket/autobahn/fuzzingclient.js b/ext/websocket/autobahn/fuzzingclient.js index 8aa716695..ee200e452 100644 --- a/ext/websocket/autobahn/fuzzingclient.js +++ b/ext/websocket/autobahn/fuzzingclient.js @@ -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( |