Skip to content

Bind each test run to the job that started it - #65

Merged
vbucc merged 2 commits into
mainfrom
fix/issue-30-test-run-ownership
Oct 8, 2026
Merged

vbucc merged 2 commits into
mainfrom
fix/issue-30-test-run-ownership

Conversation

@vbucc

@vbucc vbucc commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

A test job could report succeeded with another run's results: wrong tests, sometimes even the wrong mode. Unity's test callbacks carry no run identity, so the service credited a run to whichever job was current when it bound. Upstream 9f8152c closed the in-domain path. This closes the three that remained:

  • A request queued behind an earlier run picked up the newer current job when the lock freed, so it ran a cleared job's filter as that newer job.
  • After a domain reload, the current job was assumed to own the resumed run, even when its own request had died while queued.
  • A reload forgot a run whose job was already cleared, so the next run overlapped it and both reported into the new job.

The service now records the requesting job before waiting, and refuses to start the run if that job was cleared meanwhile. It also keeps the run's owner in SessionState until the run reports back, and restores tracking from it after a reload. A job whose request died in a reload now fails immediately. The Play Mode settings stay with a resumed run. clear_stuck drops the recorded owner, so a reload still frees a run Unity lost. The tools reference now says that abandoning a recovered run takes clear_stuck followed by a reload.

Testing

  • Five regression tests were added to TestJobManagerLifecycleTests, plus one new assertion in an existing test.
    • Run against the unfixed code, those six failed for the expected reasons and the other 1292 EditMode tests passed.
    • With the fix, all 1298 pass.
  • Gate on 170684b:
    • smoke: pass
    • EditMode: 1220 passed, 0 failed, 78 skipped
    • PlayMode: reported "no passing tests" because this project has no PlayMode tests (the run's total was 0)
  • tools/check-unity-versions.sh compiles clean on 6000.5.5f1.

Commits:

  • Bind each test run to the job that started it
  • Bump version to 10.3.0-fork.4

Issue: #30

🤖 Generated with Claude Code

vbucc and others added 2 commits October 8, 2026 02:23
A test job could report succeeded with another run's results, even a
different mode's: Unity's test callbacks carry no run identity, so the
service credited a run to whichever job was current when it bound.
Upstream 9f8152c closed the in-domain path; three remained:

- A request waiting behind an earlier run read the current job only
  once the lock freed, so a cleared job's request ran its own filter
  as the newer job (or as nobody, holding the busy flag).
- After a domain reload, the current job was assumed to own the
  resumed run, even when its own request had died while queued.
- A reload forgot a run whose job was already cleared, so the next
  run overlapped it and both reported into the new job.

Record the requesting job before waiting and refuse to start if it was
cleared meanwhile. Record the run's owner in SessionState until the run
reports back and restore tracking from it after a reload; a current
job whose request died with the old domain now fails at once, and the
Play Mode settings stay with a resumed run. clear_stuck drops the
recorded owner so the next reload still releases a run Unity lost.

Issue #30.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vbucc
vbucc merged commit f3dd023 into main Oct 8, 2026
0 of 2 checks passed
@vbucc
vbucc deleted the fix/issue-30-test-run-ownership branch October 8, 2026 06:27
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