From 45f73d3390000571f79615c46e72e49b5ee20fab Mon Sep 17 00:00:00 2001 From: Amod Malviya Date: Sat, 4 May 2024 18:47:19 +0530 Subject: [PATCH] ios: use a higher timeout in tests --- tests/common.rs | 2 +- tests/test_ios.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/common.rs b/tests/common.rs index ea1998a..b88ab39 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -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"), diff --git a/tests/test_ios.rs b/tests/test_ios.rs index d1fb8e7..552e455 100644 --- a/tests/test_ios.rs +++ b/tests/test_ios.rs @@ -72,8 +72,9 @@ mod tests { }) .collect::>() .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, err_msg: &str| { revert_code(); let success = match result {