Skip to content

Commit e5d27c5

Browse files
committed
ios: fix test timeout
1 parent 45f73d3 commit e5d27c5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/ios.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
# Run tests
4949
- name: Run tests
5050
run: cargo +${{ matrix.rust }} test --verbose --test test_ios -- --include-ignored --nocapture
51+
env:
52+
TEST_REQ_TIMEOUT: '300'
5153

5254
# Code format, linting etc.
5355
- name: Check Code Formatting

tests/common.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ where
8181
op(&format!("http://{}:{}{}", host, port, &uri), port);
8282

8383
// wait for the url to be hit
84-
let timeout = if cfg!(target_os = "ios") { 360 } else { 90 };
84+
let timeout = option_env!("TEST_REQ_TIMEOUT")
85+
.map(|s| s.parse().expect("failed to parse TEST_REQ_TIMEOUT"))
86+
.unwrap_or(90);
8587
match rx.recv_timeout(std::time::Duration::from_secs(timeout)) {
8688
Ok(msg) => assert_eq!(decode(&msg).unwrap(), uri),
8789
Err(_) => panic!("failed to receive uri data"),

0 commit comments

Comments
 (0)