Skip to content

Fix race - #13

Open
Tom-Willemsen wants to merge 2 commits into
masterfrom
fix_race
Open

Fix race#13
Tom-Willemsen wants to merge 2 commits into
masterfrom
fix_race

Conversation

@Tom-Willemsen

Copy link
Copy Markdown
Member

Fixes a race brought to light by ISISComputingGroup/lewis#336 - that PR subtly changes emulator timing behaviour, in a way our tests should be resilient to. But in this test, we were relying on a get_value completing quickly enough to see the most recent update, in a brittle way.

It's been replaced with the standard causes_func_to_return_true machinery to avoid this race.

To test this:

  • Run python -m pip install git+https://github.com/ISISComputingGroup/lewis@c79836a93d62b93a5a43a3398d664b246e975b31
  • On master, run run_tests.bat - test_GIVEN_buffer_almost_full_WHEN_buffer_fills_and_overflows_THEN_correct_readings_returned_1 will probably fail
  • On this branch, it should work again

@github-project-automation github-project-automation Bot moved this to Flash Review in Tasks Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Flash Review

Development

Successfully merging this pull request may close these issues.

1 participant