Skip to content

Commit

Permalink
ios: fix test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
amodm committed May 4, 2024
1 parent 45f73d3 commit e5d27c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
# Run tests
- name: Run tests
run: cargo +${{ matrix.rust }} test --verbose --test test_ios -- --include-ignored --nocapture
env:
TEST_REQ_TIMEOUT: '300'

# Code format, linting etc.
- name: Check Code Formatting
Expand Down
4 changes: 3 additions & 1 deletion tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ where
op(&format!("http://{}:{}{}", host, port, &uri), port);

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

0 comments on commit e5d27c5

Please sign in to comment.