Skip to content

Commit 9dbc3d0

Browse files
committed
Wait longer for the server to start in integration tests/benchmarks.
I should really do this properly with a retry/backoff loop or something instead of guessing how long it will take, but that's a project for another day.
1 parent 4d81b47 commit 9dbc3d0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

benches/load_test.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ impl RunningServer {
148148
let mut process = command.spawn().expect("Failed to spawn process");
149149

150150
// Give the server a chance to start up.
151-
thread::sleep(time::Duration::from_millis(500));
151+
// TODO: It would be better to poll by retrying a few times if the
152+
// connection is refused.
153+
thread::sleep(time::Duration::from_secs(1));
152154

153155
// The server may have failed to start if the content directory was invalid.
154156
if let Ok(Some(_)) = process.try_wait() {

tests/lib/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl RunningServer {
7272
// Give the server a chance to start up.
7373
// TODO: It would be better to poll by retrying a few times if the
7474
// connection is refused.
75-
thread::sleep(time::Duration::from_millis(500));
75+
thread::sleep(time::Duration::from_secs(1));
7676

7777
// The server may have failed to start if the content directory was
7878
// invalid.

0 commit comments

Comments
 (0)