Skip to content

Commit

Permalink
test: prevent race condition failure on it-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fpaul-1A committed Sep 13, 2024
1 parent b9214f1 commit bc0cf55
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/@o3r/test-helpers/src/utilities/locker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ export class Locker {
resolve();
}
};
watcher = watch(this.options.lockFilePath, {persistent: false}, check);
watcher.on('error', check);
try {
watcher = watch(this.options.lockFilePath, {persistent: false}, check);
watcher.on('error', check);
} catch {
check();
}
});
}
}

0 comments on commit bc0cf55

Please sign in to comment.