Skip to content

test: stop guessing how far a scan gets before you stop it - #52

Merged
Harted merged 1 commit into
mainfrom
fix/scan-stop-race
Aug 30, 2026
Merged

test: stop guessing how far a scan gets before you stop it#52
Harted merged 1 commit into
mainfrom
fix/scan-stop-race

Conversation

@Harted

@Harted Harted commented Aug 30, 2026

Copy link
Copy Markdown
Member

The matrix on main came back green on four runners and red on macOS Intel, in the packaged half, on one test.

11-scan-registers.spec.ts starts a scan over the whole range one register at a time, checks that five fields are disabled, stops it, and then asserts that address 26 has not been reached yet:

Locator:  locator('.MuiDataGrid-row[data-id="26"]')
Expected: not visible
Received: visible

That last assertion is a guess about how fast the machine is. The scan walks one register at a time with a 5ms pause, so 26 of them take a few hundred milliseconds, which is about what those five assertions cost. The fastest runner got there first, and the test failed because the app was quick.

The same shape as the flat waits that came out of the hardware specs earlier today.

What stopping means is that no more rows arrive, so that is what it waits to see: the row count at the moment it stopped, and the same count a second later. Nothing in that depends on the machine.

Local: the spec passes at 30. The matrix runs on this branch.

The spec started a scan over the whole range one register at a time,
checked five fields were disabled, stopped it, and then asserted that
address 26 had not been reached. That last part is a guess about how fast
the machine is: 26 registers with a 5ms pause each is a few hundred
milliseconds, about what those five assertions cost. macOS Intel got
there first and the test failed for being right.

What stopping means is that no more rows arrive, so that is what it
waits to see now: the count when it stopped, again a second later.
@Harted
Harted marked this pull request as ready for review August 30, 2026 18:59
@Harted
Harted merged commit e05e1d2 into main Aug 30, 2026
7 checks passed
@Harted
Harted deleted the fix/scan-stop-race branch August 30, 2026 18:59
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.

1 participant