Skip to content

Skip MultipleLogManagersTests on iOS (fixes 60-min simulator CI hang)#1500

Open
bmehta001 wants to merge 2 commits into
microsoft:mainfrom
bmehta001:bhamehta/fix-ios-multiprocess-test-hang
Open

Skip MultipleLogManagersTests on iOS (fixes 60-min simulator CI hang)#1500
bmehta001 wants to merge 2 commits into
microsoft:mainfrom
bmehta001:bhamehta/fix-ios-multiprocess-test-hang

Conversation

@bmehta001

Copy link
Copy Markdown
Contributor

Problem

The iOS CI matrix (build-ios-mac.ymliOSFuncTests) consistently fails by sitting until its 60-minute timeout across many open PRs. The hang point is MultipleLogManagersTests.ThreeInstancesCoexist:

[ RUN      ] MultipleLogManagersTests.ThreeInstancesCoexist
... xctest ... [connection] ... Connection reset by peer
##[error]The operation was canceled.   <-- 56 minutes later (job timeout)

These tests stand up an in-process HttpServer on a loopback port and run multiple concurrent LogManager instances uploading to it. That pattern deadlocks inside the iOS simulator sandbox.

Fix

Skip the whole MultipleLogManagersTests fixture on iOS via GTEST_SKIP() in SetUp(), guarded by TARGET_OS_IPHONE:

  • iOS: tests are registered and cleanly skipped — no hang.
  • macOS / desktop: unchanged, still exercised.
  • Non-Apple: no-op (TARGET_OS_IPHONE undefined).

This is test-only and cannot affect shipped code.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

The iOS CI build (build-ios-mac.yml -> iOSFuncTests) consistently sat until its
60-minute timeout. The hang point is MultipleLogManagersTests.ThreeInstancesCoexist:
these tests stand up an in-process HttpServer on a loopback port and run multiple
concurrent LogManager instances uploading to it, which deadlocks inside the iOS
simulator sandbox (the log shows the test starting, a loopback 'Connection reset
by peer', then no further output until the job is canceled at 60 minutes).

Skip the whole fixture on iOS via GTEST_SKIP() in SetUp(), guarded by
TARGET_OS_IPHONE so macOS and desktop targets keep exercising it. The guard is a
no-op on non-Apple platforms (TARGET_OS_IPHONE undefined).

Files: tests/functests/MultipleLogManagersTests.cpp

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bmehta001 bmehta001 requested a review from a team as a code owner June 30, 2026 00:26
…SKIP

The first attempt skipped the suite via GTEST_SKIP() in SetUp(), which stopped
the 60-minute hang but the iOS xctest gtest wrapper does not honor a SetUp skip:
the test bodies still ran (with the HttpServer never started) and failed at
MultipleLogManagersTests.cpp:183 and :221.

Exclude the whole suite from the iOS build with #if !defined(TARGET_OS_IPHONE) ||
!TARGET_OS_IPHONE so the tests don't exist in the iOS binary at all. macOS,
Linux and Windows still build and run them (guard is true there; on non-Apple
TARGET_OS_IPHONE is undefined -> included).

Files: tests/functests/MultipleLogManagersTests.cpp

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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