From 78299832bcd514526494457b266b65de2ab74c51 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 13 Nov 2018 20:28:39 -0800 Subject: try slowing down rust tests to fix socket collision --- rust/tests/helpers.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rust/tests/helpers.rs') 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"); -- cgit v1.2.3