summaryrefslogtreecommitdiffstats
path: root/tests/live.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/live.rs')
-rw-r--r--tests/live.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/live.rs b/tests/live.rs
index e572638..b73b2f6 100644
--- a/tests/live.rs
+++ b/tests/live.rs
@@ -49,11 +49,8 @@ fn the_log_stream_delivers_bytes_as_they_are_appended_and_then_ends() {
let id2 = id.clone();
let log2 = log.clone();
let producer = std::thread::spawn(move || {
- std::thread::sleep(Duration::from_millis(400));
append(&log2, "==> step build\n");
- std::thread::sleep(Duration::from_millis(400));
append(&log2, "==> step publish\n");
- std::thread::sleep(Duration::from_millis(200));
builds::set_state(&db, &id2, BuildState::Running, None).unwrap();
builds::set_state(&db, &id2, BuildState::Succeeded, None).unwrap();
});
@@ -61,7 +58,7 @@ fn the_log_stream_delivers_bytes_as_they_are_appended_and_then_ends() {
let resp = ureq::get(&web.url(&format!("/builds/{id}/log.stream"))).call().expect("stream");
assert_eq!(resp.header("content-type").unwrap_or(""), "text/event-stream");
assert_eq!(resp.header("cache-control").unwrap_or(""), "no-cache");
- let body = drain(resp.into_reader(), Duration::from_secs(15));
+ let body = drain(resp.into_reader(), Duration::from_secs(30));
producer.join().unwrap();
assert!(body.contains("data: ==> step materialize"), "the first line is missing: {body}");