Skip to content

Commit 66a4017

Browse files
committed
Fix: add delays to avoid test failures based on CPU load.
1 parent 7fadf00 commit 66a4017

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

server/src/ide/filewatcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ mod tests {
10641064
s.push_str("123");
10651065
fs::write(&file_path, s).unwrap();
10661066
// Wait for the filewatcher to debounce this file write.
1067-
sleep(Duration::from_secs(2)).await;
1067+
sleep(Duration::from_secs(3)).await;
10681068
// The version is random; don't check it with a fixed value.
10691069
let msg = get_message_as!(to_client_rx, EditorMessageContents::Update);
10701070
assert_eq!(

server/tests/overall_core/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ macro_rules! harness {
182182
// running.
183183
eprintln!("Failed to start the webdriver process: {err:#?}");
184184
}
185+
// Wait for the driver to start up.
186+
sleep(Duration::from_millis(500)).await;
185187
let driver = WebDriver::new(server_url, caps).await?;
186188
let driver_clone = driver.clone();
187189
let driver_ref = &driver_clone;

0 commit comments

Comments
 (0)