Skip to content

Commit

Permalink
ios: use a higher timeout in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amodm committed May 4, 2024
1 parent 1117385 commit 45f73d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ where
op(&format!("http://{}:{}{}", host, port, &uri), port);

// wait for the url to be hit
let timeout = 90;
let timeout = if cfg!(target_os = "ios") { 360 } else { 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
3 changes: 2 additions & 1 deletion tests/test_ios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ mod tests {
})
.collect::<Vec<String>>()
.join("\n");
fs::write(&swift_src, new_code).expect("failed to modify ContentView.swift");
fs::write(&swift_src, &new_code).expect("failed to modify ContentView.swift");
let revert_code = || fs::write(&swift_src, &old_code).expect("failed to revert code");
println!("Modifying ContentView.swift to:\n{}", &new_code);
let handle_exec_result = |result: std::io::Result<ExitStatus>, err_msg: &str| {
revert_code();
let success = match result {
Expand Down

0 comments on commit 45f73d3

Please sign in to comment.