mirror of
https://github.com/openai/codex.git
synced 2026-04-26 23:55:25 +00:00
Reduce burst testing flake (#9549)
## Summary - make paste-burst tests deterministic by injecting explicit timestamps instead of relying on wall clock timing - add time-aware helpers for input/submission paths so tests can drive the burst heuristic precisely - update burst-related tests to flush using computed timeouts while preserving behavior assertions - increase timeout slack in shell_tools_start_before_response_completed_when_stream_delayed to reduce flakiness
This commit is contained in:
@@ -69,9 +69,9 @@ async fn build_codex_with_test_tool(server: &wiremock::MockServer) -> anyhow::Re
|
||||
}
|
||||
|
||||
fn assert_parallel_duration(actual: Duration) {
|
||||
// Allow headroom for runtime overhead while still differentiating from serial execution.
|
||||
// Allow headroom for slow CI scheduling; barrier synchronization already enforces overlap.
|
||||
assert!(
|
||||
actual < Duration::from_millis(750),
|
||||
actual < Duration::from_millis(1_200),
|
||||
"expected parallel execution to finish quickly, got {actual:?}"
|
||||
);
|
||||
}
|
||||
@@ -308,7 +308,7 @@ async fn shell_tools_start_before_response_completed_when_stream_delayed() -> an
|
||||
let args = json!({
|
||||
"command": command,
|
||||
"login": false,
|
||||
"timeout_ms": 1_000,
|
||||
"timeout_ms": 5_000,
|
||||
});
|
||||
|
||||
let first_chunk = sse(vec![
|
||||
@@ -371,7 +371,7 @@ async fn shell_tools_start_before_response_completed_when_stream_delayed() -> an
|
||||
let _ = first_gate_tx.send(());
|
||||
let _ = follow_up_gate_tx.send(());
|
||||
|
||||
let timestamps = tokio::time::timeout(Duration::from_secs(1), async {
|
||||
let timestamps = tokio::time::timeout(Duration::from_secs(5), async {
|
||||
loop {
|
||||
let contents = fs::read_to_string(output_path)?;
|
||||
let timestamps = contents
|
||||
|
||||
Reference in New Issue
Block a user