Skip to content

Commit 7733e7a

Browse files
authored
Make waitForRequestBlock run every event loop (#480)
1 parent 4e4a2a3 commit 7733e7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/replicate.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1486,12 +1486,12 @@ test('replication updates on core copy', async function (t) {
14861486
await t.execution(promise)
14871487
})
14881488

1489-
async function waitForRequestBlock (core, opts) {
1489+
async function waitForRequestBlock (core) {
14901490
while (true) {
14911491
const reqBlock = core.replicator._inflight._requests.find(req => req && req.block)
14921492
if (reqBlock) break
14931493

1494-
await new Promise(resolve => setTimeout(resolve, 1))
1494+
await new Promise(resolve => setImmediate(resolve))
14951495
}
14961496
}
14971497

0 commit comments

Comments
 (0)