Skip to content

fix(platform-ios): clear graceful shutdown timer#167

Draft
V3RON wants to merge 2 commits into
mainfrom
agent/fix-ios-xctest-shutdown-timer
Draft

fix(platform-ios): clear graceful shutdown timer#167
V3RON wants to merge 2 commits into
mainfrom
agent/fix-ios-xctest-shutdown-timer

Conversation

@V3RON

@V3RON V3RON commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What is this?

This PR fixes iOS Harness test runs lingering for roughly 30 seconds after the XCTest agent has already shut down successfully. The graceful-shutdown path used nested Promise.race calls with referenced timeout promises; when the protocol shutdown and xcodebuild exit won those races, the losing timers remained active until their 30-second deadlines.

How does it work?

The platform-iOS shutdown path now owns one local cancellable timeout and clears it in finally whenever the race settles. The change stays local to the package—no shared utility is extracted—and preserves the existing sequence: request client.shutdown(), wait for the xcodebuild process task to exit, then use the shared terminate() helper only as fallback.

A fake-timer regression test verifies that successful protocol shutdown invokes the shutdown request, avoids process termination, and leaves no active timer. Validation covered a forced platform-Apple build with dependencies, platform-Apple typechecking and linting, the full platform-iOS suite (60 tests across 11 files), and the focused XCTest-agent suite (18 tests); commit and push hooks also passed their affected-project typecheck, lint, and build checks.

Why is this useful?

Successful iOS test runs can exit promptly instead of waiting for a stale 30-second timer, while retaining graceful XCTest/xcodebuild teardown and the established SIGTERM/SIGKILL fallback for genuine shutdown failures.

@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-harness Ready Ready Preview, Comment Jul 21, 2026 9:05am

Request Review

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