Skip to content

Commit

Permalink
Fix intermittent testing failure
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew committed May 15, 2024
1 parent 75aa73e commit 2b2212b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/langium/test/workspace/workspace-lock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ describe('WorkspaceLock', () => {
const mutex = new DefaultWorkspaceLock();
const now = Date.now();
const magicalNumber = await mutex.read(() => new Promise(resolve => setTimeout(() => resolve(42), 10)));
// Confirm that at least 10ms have elapsed
expect(Date.now() - now).toBeGreaterThanOrEqual(10);
// Confirm that at least 5ms have elapsed
expect(Date.now() - now).toBeGreaterThanOrEqual(5);
// Confirm the returned value
expect(magicalNumber).toBe(42);
});
Expand Down

0 comments on commit 2b2212b

Please sign in to comment.