Skip to content

Commit a84545c

Browse files
committed
Debug logs for flaky node test
1 parent d3808db commit a84545c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/node/tests/sync-stream.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ describe('Sync streams', () => {
6666
streams: [stream('stream', false)]
6767
})
6868
);
69+
console.log('waiting for status update after sending checkpoint line');
6970
let status = await statusPromise;
7071
for (const subscription of [a, b]) {
7172
expect(status.forStream(subscription).subscription.active).toBeTruthy();
@@ -75,12 +76,15 @@ describe('Sync streams', () => {
7576

7677
statusPromise = nextStatus(database);
7778
syncService.pushLine({ partial_checkpoint_complete: { last_op_id: '0', priority: 1 } });
79+
console.log('waiting for status update after sending partial checkpoint complete');
7880
status = await statusPromise;
7981
expect(status.forStream(a).subscription.lastSyncedAt).toBeNull();
8082
expect(status.forStream(b).subscription.lastSyncedAt).not.toBeNull();
83+
console.log('waiting for b.waitForFirstSync()');
8184
await b.waitForFirstSync();
8285

8386
syncService.pushLine({ checkpoint_complete: { last_op_id: '0' } });
87+
console.log('waiting for a.waitForFirstSync() after sending checkpoint_complete line');
8488
await a.waitForFirstSync();
8589
});
8690

0 commit comments

Comments
 (0)