This repository has been archived by the owner on Jan 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: update to match new zoe/tools/manualTimer.js
In Agoric/agoric-sdk#5847 , Zoe's `tools/manualTimer.js` is updated to align with the new SwingSet TimerService. In this new version, when the ManualTimer is configured with `eventLoopIteration`, an `await tick()` will properly drain the promise queue before proceeding. In addition, the TimerService will fire a `setWakeup(now)` immediately, rather than requiring a `tick()` first. This changes the behavior of tests which were not correctly synchronizing before, especially the timer-based fakePriceAuthority. Where previously you could set a price sequence of `[20, 55]` and use a single `await tick()` to get to `time=1` and `price=20`, in the new version, you use no ticks, and start out with `time=0` and `price=20`. A single `await tick()` gets you `time=1` and `price=55`. This requires changes to the unit tests, in general removing one `tick()` and decrementing the expected timestamp by one.
- Loading branch information
Showing
1 changed file
with
23 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters