Skip to content

Commit 54bcc22

Browse files
committed
test: give the runtime suite CI headroom for live-network ESM specs
1 parent 736365c commit 54bcc22

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/npm_release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ jobs:
211211
# try to run the tests with xcpretty. If it fails then try again without xcpretty twice for better log output
212212
# the xcode tests are a bit flaky and they should never fail on this step, as this step only collects the JS test results as junit xml
213213
with:
214-
timeout_minutes: 20
214+
# Build (~10m) + the runtime suite's report-wait (now up to 10m, see
215+
# TestRunnerTests.swift) need more than 20m headroom per attempt.
216+
timeout_minutes: 40
215217
max_attempts: 2
216218
command: set -o pipefail && xcodebuild -project v8ios.xcodeproj -scheme TestRunner -resultBundlePath $TEST_FOLDER/test_results -destination platform\=iOS\ Simulator,OS\=17.2,name\=iPhone\ 15\ Pro\ Max build test | xcpretty
217219
on_retry_command: rm -rf $TEST_FOLDER/test_results* && xcrun simctl shutdown all

.github/workflows/pull_request.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ jobs:
112112
# try to run the tests with xcpretty. If it fails then try again without xcpretty twice for better log output
113113
# the xcode tests are a bit flaky and they should never fail on this step, as this step only collects the JS test results as junit xml
114114
with:
115-
timeout_minutes: 20
115+
# Build (~10m) + the runtime suite's report-wait (up to 10m, see
116+
# TestRunnerTests.swift) need more than 20m headroom per attempt.
117+
timeout_minutes: 40
116118
max_attempts: 2
117119
command: set -o pipefail && xcodebuild -project v8ios.xcodeproj -scheme TestRunner -resultBundlePath $TEST_FOLDER/test_results -destination platform\=iOS\ Simulator,OS\=17.2,name\=iPhone\ 15\ Pro\ Max build test | xcpretty
118120
on_retry_command: rm -rf $TEST_FOLDER/test_results* && xcrun simctl shutdown all

TestRunnerTests/TestRunnerTests.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,14 @@ class TestRunnerTests: XCTestCase {
6161
loop.stop()
6262
}
6363

64-
func testRuntime() {
65-
let jasmineTestsTimeout: TimeInterval = 300
64+
func testRuntime() {
65+
// Headroom for CI: some specs (HttpEsmLoaderTests, RemoteModuleSecurityTests)
66+
// perform live network I/O against intentionally-unreachable/slow hosts
67+
// (e.g. 192.0.2.1 timeout-test, esm.sh). Each can burn up to NSURLSession's
68+
// ~60s request timeout, so under slower CI networks the full suite can run
69+
// past a 300s budget and never POST results -> false timeout. 600s avoids
70+
// that while still failing fast on a genuine hang.
71+
let jasmineTestsTimeout: TimeInterval = 600
6672

6773
let app = XCUIApplication()
6874
app.launchEnvironment["REPORT_BASEURL"] = "http://[::1]:\(port)/junit_report"

0 commit comments

Comments
 (0)