aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-13 20:28:39 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-13 20:28:39 -0800
commit78299832bcd514526494457b266b65de2ab74c51 (patch)
tree087e35df7d03586fa906b3d5ca5737f27528b030 /rust
parent8d956a3280e681b479506d1b6adab1756aca0bcc (diff)
downloadfatcat-78299832bcd514526494457b266b65de2ab74c51.tar.gz
fatcat-78299832bcd514526494457b266b65de2ab74c51.zip
try slowing down rust tests to fix socket collision
Diffstat (limited to 'rust')
-rw-r--r--rust/tests/helpers.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/tests/helpers.rs b/rust/tests/helpers.rs
index dd23b0fc..a5685614 100644
--- a/rust/tests/helpers.rs
+++ b/rust/tests/helpers.rs
@@ -6,6 +6,7 @@ extern crate uuid;
extern crate iron;
extern crate iron_test;
+use std::{thread, time};
use self::iron_test::response;
use iron::{status, Iron, Listening, Headers};
use iron::headers::ContentType;
@@ -22,6 +23,8 @@ pub fn setup_client() -> (
) {
let server = fatcat::test_server().unwrap();
let router = fatcat_api_spec::router(server);
+ // this is an unfortunate hack for testings seeming to fail in CI
+ thread::sleep(time::Duration::from_millis(100));
let iron_server = Iron::new(router)
.http("localhost:9144")
.expect("Failed to start HTTP server");