Skip to content

fix: resolve #2807 — Possible flaky test in Endo#3166

Open
tudragon154203 wants to merge 2 commits intoendojs:masterfrom
tudragon154203:contribai/improve/quality/add-deterministic-ordering-assertions-to
Open

fix: resolve #2807 — Possible flaky test in Endo#3166
tudragon154203 wants to merge 2 commits intoendojs:masterfrom
tudragon154203:contribai/improve/quality/add-deterministic-ordering-assertions-to

Conversation

@tudragon154203
Copy link
Copy Markdown

Summary

fix: resolve #2807 — Possible flaky test in Endo

Problem

Severity: Medium | File: packages/ses/test/test-importNow.js

Tests that verify importNow behavior may be asserting on ordering that isn't guaranteed by the implementation, or may be passing locally due to favorable timing but failing in CI where execution timing varies.

Solution

Review tests that involve multiple importNow calls or check execution order. Ensure tests properly await all async operations before asserting. Add explicit synchronization points where needed. Consider using a deterministic test helper that waits for all queued jobs to complete before checking results. If testing ordering, ensure the test explicitly sets up the scenario rather than relying on implicit timing.

Changes

  • packages/ses/test/test-importNow.js (new)
  • packages/ses/src/jobQueue.js (new)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

Generated by ContribAI v5.15.0

Fixes endojs#2807

Signed-off-by: tudragon154203 <76395825+tudragon154203@users.noreply.github.com>
Fixes endojs#2807

Signed-off-by: tudragon154203 <76395825+tudragon154203@users.noreply.github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 7, 2026

⚠️ No Changeset found

Latest commit: c242ebc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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 this pull request may close these issues.

Possible flaky test in Endo

1 participant