Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async-flow: deeper wake testing #9383

Open
erights opened this issue May 19, 2024 · 0 comments · May be fixed by #10208
Open

async-flow: deeper wake testing #9383

erights opened this issue May 19, 2024 · 0 comments · May be fixed by #10208
Assignees
Labels
asyncFlow related to membrane-based replay and upgrade of async functions bug Something isn't working

Comments

@erights
Copy link
Member

erights commented May 19, 2024

At #9097 (comment) @mhofman writes:

Technically the flow woke up on its own (wakeAll in prepareAsyncFlowTools) for both the following reasons:

  • it was defined as an eager waker (default)
  • it was in a failed state from a bad replay in the previous test.

A different approach may be to split this testGoodReplay test in 2, have the first one redefine the flow using startEager = false so it gets removed from the eager wakers, and only resolve v3 in the next test to verify that resolving the vow actually wakes up the flow. We should also verify then that the flow wasn't awoken before the vow resolution (probably can set a variable right after resolution of v3, and check that the variable is set inside the guest flow)

Given "A different approach may be" and due to limited time and immediate demand, I'm filing this rather than addressing it in #9097 itself. Should still be addressed in a later PR.

@erights erights added bug Something isn't working asyncFlow related to membrane-based replay and upgrade of async functions labels May 19, 2024
mergify bot added a commit that referenced this issue Sep 25, 2024
closes: #9126

Best reviewed commit-by-commit

## Description
This PR add a new `prepare-strict-test-env.js` which enforces durable requirements on the baggage and provide helpers to simulate upgrades based on the helper from the `async-flow` and `zone` package tests.

In particular it adds a new `startLife` helper which enforces kind redefinition rules for a `build` step, and rejects previously watched promises (assuming they were all decided by the previous incarnation).

### Security Considerations

None, test infra only

### Scaling Considerations

None

### Documentation Considerations

Some types added and clarified. Internal tooling

### Testing Considerations

Adds tests of the new strict env and `startLife` helper.
Add liveslots based test in `vow` using the new `startLife` helper.
Updated the test environments in the `zone` and `async-flow` package to use the new liveslots env, but does not update the `async-flow` tests to use the stricter `startLife` (will be done in #9933 or #9383)

### Upgrade Considerations
Better upgrade testing without needing a full swingset kernel
@mhofman mhofman linked a pull request Oct 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asyncFlow related to membrane-based replay and upgrade of async functions bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants