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

[BUG] @inngest/test triggers step twice #731

Closed
aon opened this issue Oct 27, 2024 · 3 comments · Fixed by #741
Closed

[BUG] @inngest/test triggers step twice #731

aon opened this issue Oct 27, 2024 · 3 comments · Fixed by #741

Comments

@aon
Copy link

aon commented Oct 27, 2024

Describe the bug
First of all, thanks for the new page! Makes it really easy to test inngest functions.

I'm having an issue where the first step is executed twice.

To Reproduce
Steps to reproduce the behavior:

  • Create any inngest function with two steps, and see how the first step is always

Hint

It seems that setting disableImmediateExecution to true prevents it triggering twice, although it really slows down execution.

Copy link

linear bot commented Oct 27, 2024

@jpwilliams
Copy link
Member

Thanks for the report, @aon!

Which version of @inngest/test is this using and what's the code being run? It sounds like you may be using a lower-level API or an older version.

@aon
Copy link
Author

aon commented Nov 8, 2024

Hi! I've created a repository to show this and #732. https://github.com/aon/inngest-debug-test-package

I've noticed also, that when adding a logger to the inngest instance, the test suddenly slow down by 10x.

jpwilliams added a commit that referenced this issue Nov 12, 2024
## Summary
<!-- Succinctly describe your change, providing context, what you've
changed, and why. -->

Fixes `@inngest/test` not capturing initial errors within a function as
well as steps sometimes running twice.

For now this continues to not model retries, as per the README.

## Checklist
<!-- Tick these items off as you progress. -->
<!-- If an item isn't applicable, ideally please strikeout the item by
wrapping it in "~~"" and suffix it with "N/A My reason for skipping
this." -->
<!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" -->

- [ ] ~Added a [docs PR](https://github.com/inngest/website) that
references this PR~ N/A Bug fix
- [ ] ~Added unit/integration tests~ N/A Using in
`@inngest/middleware-validation`
- [x] Added changesets if applicable

## Related
<!-- A space for any related links, issues, or PRs. -->
<!-- Linear issues are autolinked. -->
<!-- e.g. - INN-123 -->
<!-- GitHub issues/PRs can be linked using shorthand. -->
<!-- e.g. "- inngest/inngest#123" -->
<!-- Feel free to remove this section if there are no applicable related
links.-->
- Fixes #731 
- Fixes #732
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants