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
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ describe('control event publication ordering', () => {
}
);

it('re-arms a woken reservation if another Session consumes the available bytes', async () => {
it('keeps a woken reservation isolated from another root lane', async () => {
const outbox = createControlEventOutbox({ publish: async () => {}, onFailure: mock() });
try {
for (let index = 0; index < 8; index += 1)
Expand All @@ -182,18 +182,7 @@ describe('control event publication ordering', () => {
outbox.prepare({ event: 'session.event', session: other, payload: medium })
)
).toBe(true);
expect(outbox.enqueue(older)).toBe(false);
const waitingAgain = outbox.waitForSpace(older);
expect(waitingAgain).not.toBe(waiting);
expect(outbox.waitForSpace(older)).toBe(waitingAgain);
let settled = false;
void waitingAgain.then(() => {
settled = true;
});
await Promise.resolve();
expect(settled).toBe(false);
outbox.close();
expect(await waitingAgain).toBe(false);
expect(outbox.enqueue(older)).toBe(true);
} finally {
outbox.close();
}
Expand Down
Loading