Skip to content

Commit eaa4199

Browse files
authored
Merge pull request #90 from mkantor/wait-longer-for-test-server-startup
Wait longer for the server to start in integration tests/benchmarks.
2 parents 4d81b47 + 9dbc3d0 commit eaa4199

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)