Skip to content

Commit

Permalink
Merge branch 'w/2.7/improvement/ZENKO-4941' into tmp/octopus/w/2.8/im…
Browse files Browse the repository at this point in the history
…provement/ZENKO-4941
  • Loading branch information
bert-e committed Dec 3, 2024
2 parents a15cec0 + 2ff031b commit 09a577a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/ctst/steps/utils/kubernetes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export async function createJobAndWaitForCompletion(
}

try {
// Acquire lock on the file
releaseLock = await lockFile.lock(lockFilePath, { stale: 600000 });
// Acquire lock on the file with 1s delay and 10 minutes timeout
releaseLock = await lockFile.lock(lockFilePath, { stale: 1000, retries: 600 });
world.logger.debug(`Acquired lock for job: ${jobName}`);

// Read the cron job and prepare the job spec
Expand Down Expand Up @@ -153,7 +153,6 @@ export async function createJobAndWaitForCompletion(
// Ensure the lock is released
if (releaseLock) {
await releaseLock();
fs.unlinkSync(lockFilePath);
world.logger.debug(`Released lock for job: ${jobName}`);
}
}
Expand Down

0 comments on commit 09a577a

Please sign in to comment.