aboutsummaryrefslogtreecommitdiffstats
path: root/test/runner/browserstack
diff options
context:
space:
mode:
authorTimmy Willison <timmywil@users.noreply.github.com>2024-03-05 15:50:51 -0500
committerGitHub <noreply@github.com>2024-03-05 15:50:51 -0500
commit02d23478289e45af3d7f4673b9ffe84591c23472 (patch)
treec55b41c0d577338e0d0f51325b6801d9ba31e986 /test/runner/browserstack
parent95a4c94b8131b737d8f160c582a4acfe2b65e0f8 (diff)
downloadjquery-02d23478289e45af3d7f4673b9ffe84591c23472.tar.gz
jquery-02d23478289e45af3d7f4673b9ffe84591c23472.zip
Tests: fix flakey message logs; ignore delete worker failures
Close gh-5432
Diffstat (limited to 'test/runner/browserstack')
-rw-r--r--test/runner/browserstack/browsers.js18
-rw-r--r--test/runner/browserstack/queue.js2
2 files changed, 13 insertions, 7 deletions
diff --git a/test/runner/browserstack/browsers.js b/test/runner/browserstack/browsers.js
index 957c9aac8..3a7da4fc9 100644
--- a/test/runner/browserstack/browsers.js
+++ b/test/runner/browserstack/browsers.js
@@ -187,13 +187,19 @@ export async function cleanupAllBrowsers( { verbose } ) {
const workersRemaining = Object.values( workers );
const numRemaining = workersRemaining.length;
if ( numRemaining ) {
- await Promise.all(
- workersRemaining.map( ( worker ) => deleteWorker( worker.id ) )
- );
- if ( verbose ) {
- console.log(
- `Stopped ${ numRemaining } browser${ numRemaining > 1 ? "s" : "" }.`
+ try {
+ await Promise.all(
+ workersRemaining.map( ( worker ) => deleteWorker( worker.id ) )
);
+ if ( verbose ) {
+ console.log(
+ `Stopped ${ numRemaining } browser${ numRemaining > 1 ? "s" : "" }.`
+ );
+ }
+ } catch ( error ) {
+
+ // Log the error, but do not consider the test run failed
+ console.error( error );
}
}
}
diff --git a/test/runner/browserstack/queue.js b/test/runner/browserstack/queue.js
index 10ef14a2b..c948f29bf 100644
--- a/test/runner/browserstack/queue.js
+++ b/test/runner/browserstack/queue.js
@@ -39,7 +39,7 @@ export function retryTest( reportId, maxRetries ) {
console.log(
`Retrying test ${ reportId } for ${ chalk.yellow(
test.options.modules.join( ", " )
- ) }...`
+ ) }...${ test.retries }`
);
return test;
}