Skip to content

Commit d73cd5f

Browse files
committed
chore(file-lock): Set retry options to retry faster and more frequently
1 parent ba73759 commit d73cd5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/testcontainers/src/common/file-lock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function withFileLock<T>(fileName: string, fn: () => T): Promise<T>
99
let releaseLockFn;
1010
try {
1111
log.debug(`Acquiring lock file "${file}"...`);
12-
releaseLockFn = await lockFile.lock(file, { retries: { forever: true } });
12+
releaseLockFn = await lockFile.lock(file, { retries: { forever: true, factor: 1, minTimeout: 500, maxTimeout: 3000, randomize: true } });
1313
log.debug(`Acquired lock file "${file}"`);
1414
return await fn();
1515
} finally {

0 commit comments

Comments
 (0)