Skip to content

Preserve async module order across repeat-until-failure runs - #15877

Open
cuishuang wants to merge 1 commit into
elixir-lang:mainfrom
cuishuang:main
Open

Preserve async module order across repeat-until-failure runs#15877
cuishuang wants to merge 1 commit into
elixir-lang:mainfrom
cuishuang:main

Conversation

@cuishuang

Copy link
Copy Markdown
Contributor
  • Describe here the reasons behind the pull request.
  • Make sure you have read the CONTRIBUTING.md file.
  • Make sure any relevant documentation and tests have been added/updated.
  • Do not submit Draft pull requests unless previously asked/agreed.

--repeat-until-failure restores async modules after each successful run.

The runner stores modules in execution order, but ExUnit.Server.restore_modules/2 reconstructed the internal queue and group state using the opposite ordering.

As a result, subsequent runs could reverse:

  • the order of ungrouped async modules;
  • the order of async groups;
  • the order of modules within each async group.

This change converts the runner representation back to the server's internal representation before restoring it, preserving FIFO order across repeated runs.

  • make test_ex_unit

Signed-off-by: cuishuang <imcusg@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant