Skip to content

Commit 4b95504

Browse files
authored
chore(test): catch in case of race condition (podman-desktop#8708)
Signed-off-by: Vladimir Lazar <[email protected]>
1 parent 3cd37f7 commit 4b95504

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/playwright/src/runner/podman-desktop-runner.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ export class PodmanDesktopRunner {
233233
rmSync(rawTracesPath, { recursive: true, force: true, maxRetries: 5 });
234234
}
235235

236-
if (test.info().status === 'failed') return;
236+
try {
237+
if (test.info().status === 'failed') return;
238+
} catch (err) {
239+
console.log(`Caught exception in removing traces: ${err}`);
240+
return;
241+
}
237242

238243
if (!process.env.KEEP_TRACES_ON_PASS) {
239244
const tracesPath = join(this._testOutput, 'traces', `${this._videoAndTraceName}_trace.zip`);

0 commit comments

Comments
 (0)