Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions apps/decodex/src/orchestrator/tests/operator/status/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use process::Child;

use crate::runtime;

const OPERATOR_DASHBOARD_TEST_TIMEOUT: Duration = Duration::from_secs(5);

#[cfg(unix)]
struct ActiveLeaseMissingControlFixture {
issue: TrackerIssue,
Expand Down Expand Up @@ -276,7 +278,7 @@ fn operator_dashboard_websocket_pushes_broadcast_events() {
}),
);

let deadline = Instant::now() + Duration::from_secs(1);
let deadline = Instant::now() + OPERATOR_DASHBOARD_TEST_TIMEOUT;
let payload = loop {
assert!(Instant::now() < deadline, "websocket should send broadcast events");

Expand Down Expand Up @@ -889,7 +891,7 @@ fn open_dashboard_websocket_client(address: SocketAddr) -> (TcpStream, String, V
let mut buffer = [0_u8; 2_048];

client
.set_read_timeout(Some(Duration::from_secs(1)))
.set_read_timeout(Some(OPERATOR_DASHBOARD_TEST_TIMEOUT))
.expect("client timeout should configure");
client
.write_all(
Expand Down Expand Up @@ -947,7 +949,7 @@ fn read_websocket_json_until(
frame: &mut Vec<u8>,
matches: impl Fn(&Value) -> bool,
) -> Value {
let deadline = Instant::now() + Duration::from_secs(1);
let deadline = Instant::now() + OPERATOR_DASHBOARD_TEST_TIMEOUT;
let mut buffer = [0_u8; 2_048];

loop {
Expand Down