Skip to content

Fix race condition in rebuildInMemorySorobanStateForTesting - #5351

Merged
SirTyson merged 1 commit into
stellar:masterfrom
SirTyson:module-cache-test-fix
Jul 16, 2026
Merged

Fix race condition in rebuildInMemorySorobanStateForTesting#5351
SirTyson merged 1 commit into
stellar:masterfrom
SirTyson:module-cache-test-fix

Conversation

@SirTyson

Copy link
Copy Markdown
Contributor

Description

Fixes a flaky test I think I ran into on an unrelated PR. It looks like we can call the test only module cache rebuild function while a real, background module cache build is under way, causing an assert failure. This just makes sure we finish any in-progress builds before calling the test reset function.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

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.

Pull request overview

Fixes a test-only race between Soroban state rebuilding and background module-cache compilation.

Changes:

  • Completes pending compilation before resetting ApplyState.
  • Restores phase transitions before rebuilding in-memory Soroban state.

@SirTyson
SirTyson added this pull request to the merge queue Jul 16, 2026
Merged via the queue into stellar:master with commit 3620e88 Jul 16, 2026
67 of 68 checks passed
@SirTyson
SirTyson deleted the module-cache-test-fix branch July 16, 2026 18:10
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