fix(tests): allow bounded main queue drain timeout

Closed
TE
2mo ago
+2-2

Tests added by #15381 call the shared drainMainQueue(timeout:) helper, but the helper only accepted the no-argument form. The app-host test product therefore failed to compile at every timeout call site.

Add an optional timeout parameter while preserving the existing one-second default. This keeps the tests' bounded main-queue spin behavior and restores compilation for all current callers.

Validation:

  • swiftc -parse cmuxTests/TabManagerUnitTests.swift
  • python3 scripts/verify-local.py --only swift-syntax --swift-changed origin/main
  • git diff --check

Summary by cubic

Fixes test compilation by letting drainMainQueue(timeout:) accept an optional timeout parameter while keeping the one-second default, so tests can bound their main-queue drain time.