Repository navigation
Keep the reopen tests from starting real engine work - #216
Merged
Merged
Conversation
ReopenGateTests drive the real recovery reopen, whose effects start unison_bridge_init1 on the process-wide OCaml engine. The operation was left in flight when the test ended, and it completed into the next engine test's handlers: SessionArgsBridgeTests then saw its archives locked and timed out. Add a test-only switch that skips the effects driving the engine while the coordinator still changes state, and use it in ReopenGateTests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The switch was a static flag set from an async setUp override, which CI's compiler rejects as sending a non-Sendable XCTestCase. Make it an instance property compiled only in Debug, set on the delegate each test creates, so it affects nothing else and needs no setUp or tearDown. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Owner
Author
|
CI's first run on this branch failed to compile, not on a test: the async 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the intermittent CI failure in
SessionArgsBridgeTests.test_a_pathScopesScan_andNewSessionInheritsNone, which also turnedmainred onb179e5e. The cause is a test I added in #212.Cause
ReopenGateTestsdrives the real recovery reopen, sotest_reopen_proceedsWhenNothingIsHeldrunsengine.requestOpen, whose effect callsunison_bridge_init1on the process-wide OCaml engine (AppDelegate.swift:658). The operation is still in flight when the test ends.SessionArgsBridgeTestsruns soon after (the classes sort next to each other), installs its own init handlers, and the stray completion lands in them. The CI log shows the result: the engine reports the archives locked, with the lock owner on the runner's own host (this process),fatal dismissedfrom the host app's handler, and a 20-second timeout. An earlier run in this series showed "multiple calls made toXCTestExpectation.fulfill", the same signature.Evidence (local, repeated runs of the two classes)
ReopenGateTests+SessionArgsBridgeTests, beforeSessionArgsApplyTests+SessionArgsBridgeTests(control, no engine)test_reopen_proceedsWhenNothingIsHeldalone +SessionArgsBridgeTestsSessionArgsBridgeTestsReopenGateTests+SessionArgsBridgeTests, after this changeChange
A test-only
AppDelegate.testSuppressEngineEffects(default false, like the existing test switches) skips the effects that drive the engine (connect, scan, sync, diff, close, abort). The coordinator still changes state, so the tests keep asserting the phase reached;ReopenGateTestssets it insetUpand clears it intearDown. No product behavior changes. The five tests still pass.Not covered
I did not audit other tests that drive
AppDelegate's effect runner for the same leak; the repeated runs above cover only this pair. Full suite passes locally.🤖 Generated with Claude Code