You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #10686 (convert unhandled vow rejections to unhandled promise rejections), we discovered that a few orchestration tests started to fail with unhandled promise rejections.
To Reproduce
Steps to reproduce the behavior:
Search for the use of expectUnhandled( in test files of agoric-sdk/packages/orchestration.
You'll find it used in a few places:
$ cd agoric-sdk/packages/orchestration
$ rg 'expectUnhandled\('
test/exos/local-orchestration-account-kit.test.ts
118:test(expectUnhandled(1), 'transfer', async t => {
test/examples/staking-combinations.test.ts
35:test(expectUnhandled(1), 'start', async t => {
test/examples/send-anywhere.test.ts
260:test(expectUnhandled(1), 'failed ibc transfer returns give', async t => {
$
If you run those tests individually, unhandled promise rejections are reported by AVA.
The use of expectUnhandled allows the tests to return success, even though AVA would normally fail.
I would expect these calls to the expectUnhandled(N) macros to be unnecessary.
Platform Environment
what OS are you using? what version of Node.js? Agoric CI
is there anything special/unusual about your platform? Yes, it's CI
It looks like something in the mocked transfer timeout pathway (a rejected vow instead of a fulfilment ack) is not being handled by the orchestration package.
- for `LocalOrchAccount.MsgTransfer`, a timeout does not manifest as an immediate rejection of the outgoing message over the vlocalchain bridge. instead, a `VTRANSFER_IBC_EVENT` will come with `event: "timeoutPacket"` over the vtransfer bridge.
- this WIP fixes one of the three `expectUnhandled` in #11026. remaining work is to refactor to move the incoming vtransfer bridge message logic to the test file instead of the vlocalchain bridge handler.
The 3 unhandled rejections are isolated to three places where we are incorrectly simulating a MsgTransfer timeout for a local-orchestration-account. We should have been simulating the timeout using the vtransfer bridge.
This commit fixes one of the tests, and leads us (+ @michaelfig ) to believe a MsgTransfer timeout will properly propagate as a Vow rejection for localOrchAccount.transfer(). As such, there's no impact for production.
I've relabelled this issue as a P2. The above commit needs some refactoring (alluded to in the commit message) before it can land on master.
Describe the bug
While working on #10686 (convert unhandled vow rejections to unhandled promise rejections), we discovered that a few orchestration tests started to fail with unhandled promise rejections.
To Reproduce
Steps to reproduce the behavior:
expectUnhandled(
in test files ofagoric-sdk/packages/orchestration
.expectUnhandled
allows the tests to return success, even though AVA would normally fail.I would expect these calls to the
expectUnhandled(N)
macros to be unnecessary.Platform Environment
git describe --tags --always
) a version that has fix(vow): report unhandled vow rejections on collection or upgrade #10686 merged in itThe text was updated successfully, but these errors were encountered: