diff --git a/packages/zone/package.json b/packages/zone/package.json index 45f7eaeb1ac6..4c123d60c794 100644 --- a/packages/zone/package.json +++ b/packages/zone/package.json @@ -42,6 +42,7 @@ "@endo/promise-kit": "^1.0.4" }, "devDependencies": { + "@agoric/internal": "^0.3.2", "@agoric/swingset-liveslots": "^0.10.2", "@endo/env-options": "^1.1.1", "@endo/patterns": "^1.2.0", diff --git a/packages/zone/test/async-flow/test-async-flow.js b/packages/zone/test/async-flow/test-async-flow.js index c5d39d175661..cb602005c258 100644 --- a/packages/zone/test/async-flow/test-async-flow.js +++ b/packages/zone/test/async-flow/test-async-flow.js @@ -11,6 +11,7 @@ import { import { Fail } from '@endo/errors'; // import { E } from '@endo/far'; // import E from '@agoric/vow/src/E.js'; +import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import { isVow } from '@agoric/vow/src/vow-utils.js'; import { makePromiseKit } from '@endo/promise-kit'; import { prepareVowTools } from '@agoric/vow'; @@ -218,14 +219,14 @@ await test.serial('test durable async-flow', async t => { const vowTools1 = prepareWatchableVowTools(zone1); await testFirstPlay(t, zone1, vowTools1); - await new Promise(r => setTimeout(r)); + await eventLoopIteration(); nextLife(); const zone2 = makeDurableZone(getBaggage(), 'durableRoot'); const vowTools2 = prepareWatchableVowTools(zone2); await testBadReplay(t, zone2, vowTools2, asyncFlowVerbose()); - await new Promise(r => setTimeout(r)); + await eventLoopIteration(); // nextLife(); // const zone3 = makeDurableZone(getBaggage(), 'durableRoot');