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
12 changes: 11 additions & 1 deletion tests/e2e/testnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,17 @@ const MINIMAL_STABILIZATION_TIMEOUT_SECS: u64 = 30;
const SMALL_STABILIZATION_TIMEOUT_SECS: u64 = 60;

/// Default timeout for chunk operations (seconds).
const DEFAULT_CHUNK_OPERATION_TIMEOUT_SECS: u64 = 30;
///
/// Covers the full round-trip: QUIC handshake, up to a 4 MiB payload
/// transfer, and storage confirmation. 30 s was enough on Linux CI but
/// flaked on `macos-latest` runners (nested-virt, roughly half the CPU
/// throughput of the Linux pool) when the 5-node testnet's concurrent
/// QUIC+PQC handshake burst collided with the 4 MiB
/// `test_chunk_store_on_remote_node` fixture. 90 s is deliberately
/// conservative; the happy path completes in well under a second on
/// loopback, so the larger budget only shows up on flakes. Test-only —
Comment on lines +94 to +101
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc comment mentions covering a full QUIC handshake + payload transfer, but this timeout is also used for purely local operations (store_chunk/get_chunk call protocol.try_handle_request without any network/handshake). Consider rewording the comment to reflect that it’s a shared default for both local protocol handling and remote P2P chunk ops, with the 90s budget primarily justified by the remote macOS CI case.

Suggested change
/// Covers the full round-trip: QUIC handshake, up to a 4 MiB payload
/// transfer, and storage confirmation. 30 s was enough on Linux CI but
/// flaked on `macos-latest` runners (nested-virt, roughly half the CPU
/// throughput of the Linux pool) when the 5-node testnet's concurrent
/// QUIC+PQC handshake burst collided with the 4 MiB
/// `test_chunk_store_on_remote_node` fixture. 90 s is deliberately
/// conservative; the happy path completes in well under a second on
/// loopback, so the larger budget only shows up on flakes. Test-only —
/// Shared default for both local protocol handling and remote P2P chunk
/// operations in the E2E harness. Some call sites only execute
/// `protocol.try_handle_request` locally, so they do not involve any network
/// transfer or QUIC handshake; others cover the full remote round-trip,
/// including handshake, up to a 4 MiB payload transfer, and storage
/// confirmation. 30 s was enough on Linux CI but flaked on `macos-latest`
/// runners (nested-virt, roughly half the CPU throughput of the Linux pool)
/// when the 5-node testnet's concurrent QUIC+PQC handshake burst collided
/// with the 4 MiB `test_chunk_store_on_remote_node` fixture. 90 s is
/// deliberately conservative; the happy path completes in well under a second
/// on loopback, so the larger budget only shows up on flakes. Test-only —

Copilot uses AI. Check for mistakes.
/// no production code path reads this constant.
const DEFAULT_CHUNK_OPERATION_TIMEOUT_SECS: u64 = 90;

/// Short node-level network timeout for E2E test harness.
///
Expand Down
Loading