Skip to content

Remove async test flakiness - #566

Merged
LPTK merged 2 commits into
hkust-taco:hkmc2from
AnsonYeung:async-test-fix
Oct 2, 2026
Merged

LPTK merged 2 commits into
hkust-taco:hkmc2from
AnsonYeung:async-test-fix

Conversation

@AnsonYeung

@AnsonYeung AnsonYeung commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Fix race condition in Async.mls. Enforce a strict execution order by creating Promise object that always runs in the same order.

@LPTK LPTK left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review issues remain.

Review effort: Lite
Findings: None

What changed in this PR

This PR removes async test flakiness by enforcing deterministic Promise execution order.

Changes:

  • Coordinates asynchronous operations deterministically.
  • Updates expected output snapshots.
  • Declares required Promise static methods.
File Description
hkmc2/​shared/​src/​test/​mlscript/​handlers/​Async.mls Adds deterministic promise coordination and updates snapshots.
hkmc2/​shared/​src/​test/​mlscript/​decls/​Prelude.mls Declares Promise static methods.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@LPTK
LPTK merged commit f530560 into hkust-taco:hkmc2 Oct 2, 2026
1 check passed
@LPTK
LPTK deleted the async-test-fix branch October 2, 2026 13:47
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.

3 participants