Fix per-test isolation flakiness: relaunch instead of UI logout; 4 workers

The first full 8-worker run surfaced 52 failures, 28 of them "Failed to log out"
(UITestHelpers:86) — forcing a profile-navigation logout between every test (each
test = new account) is fragile, and 8 parallel simulator clones thrashed the
machine (the remaining failures were UI timeouts under that load).

- AuthenticatedUITestCase: relaunchBetweenTests = true. A fresh app launch with
  --reset-state lands on the login screen, so each test logs in as its own account
  with NO UI logout between tests. Removed the ensureLoggedOut call.
- run_ui_tests.sh: default workers 8 -> 4 (reliable on a Mac mini; each test now
  relaunches + creates an account, so the bottleneck is CPU/simulator).

Verified: ContractorUITests (was ~15 logout failures) now passes at 4 workers,
0 leaked accounts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey T
2026-06-05 17:42:38 -05:00
parent 7cdd88b11a
commit 091248f30f
2 changed files with 14 additions and 6 deletions
+4 -1
View File
@@ -34,7 +34,10 @@ SCHEME="HoneyDueUITests"
API_SCHEME="HoneyDueAPITests"
TARGET="HoneyDueUITests"
DESTINATION="platform=iOS Simulator,name=iPhone 17 Pro"
WORKERS=8
# Data isolation removed cross-suite races, but each test now relaunches the
# app + creates an account, so the bottleneck is CPU/simulator. 4 is the reliable
# sweet spot on a Mac mini (8 thrashed the simulators -> UI timeouts). Override via arg 2.
WORKERS=4
# Suites that run in their own phases — excluded from the parallel phase.
PHASE_MANAGED=(