Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/cli/src/lib/__tests__/bootstrap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ describe('claimBootstrap', () => {
const ydoc = new YDoc();
const metaMap = ydoc.getMap('meta');

// claimBootstrap (with jitter=0) executes synchronously until
// `await sleep(settlingMs)`, so the marker is already written
// when control returns here. Deleting it simulates another
// process removing the key during the settling window.
const promise = claimBootstrap(ydoc, 20, 0);

// Another process deletes the bootstrap key during settling
setTimeout(() => {
metaMap.delete('bootstrap');
}, 2);
metaMap.delete('bootstrap');

const result = await promise;
expect(result.granted).toBe(false);
Expand Down
Loading
Loading