Remove diagnostic waits from CI tests

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-05-08 19:04:58 -07:00
parent 9c2c8d90d5
commit 2bf6f199ac
3 changed files with 8 additions and 29 deletions

View File

@@ -722,12 +722,6 @@ impl TestCodex {
personality: None,
})
.await?;
wait_for_event_with_timeout(
&self.codex,
|event| matches!(event, EventMsg::TurnStarted(_)),
SUBMIT_TURN_COMPLETE_TIMEOUT,
)
.await;
Ok(())
}

View File

@@ -35,18 +35,15 @@ use core_test_support::responses::mount_sse_sequence;
use core_test_support::responses::sse;
use core_test_support::test_codex::test_codex;
use core_test_support::wait_for_event;
use core_test_support::wait_for_event_with_timeout;
use pretty_assertions::assert_eq;
use serde_json::Value;
use serde_json::json;
use std::sync::Arc;
use tempfile::TempDir;
use tokio::time::Duration;
use wiremock::MockServer;
const AFTER_SECOND_RESUME: &str = "AFTER_SECOND_RESUME";
const AFTER_ROLLBACK: &str = "AFTER_ROLLBACK";
const THREAD_ROLLBACK_EVENT_TIMEOUT: Duration = Duration::from_secs(120);
fn network_disabled() -> bool {
std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok()
@@ -458,12 +455,8 @@ async fn snapshot_rollback_past_compaction_replays_append_only_history() -> Resu
base.submit(Op::ThreadRollback { num_turns: 1 })
.await
.expect("submit thread rollback");
let rollback_event = wait_for_event_with_timeout(
&base,
|ev| matches!(ev, EventMsg::ThreadRolledBack(_)),
THREAD_ROLLBACK_EVENT_TIMEOUT,
)
.await;
let rollback_event =
wait_for_event(&base, |ev| matches!(ev, EventMsg::ThreadRolledBack(_))).await;
let EventMsg::ThreadRolledBack(rollback_event) = rollback_event else {
panic!("expected thread rolled back event");
};
@@ -583,11 +576,9 @@ async fn snapshot_rollback_followup_turn_trims_context_updates() -> Result<()> {
conversation
.submit(Op::ThreadRollback { num_turns: 1 })
.await?;
let rollback_event = wait_for_event_with_timeout(
&conversation,
|ev| matches!(ev, EventMsg::ThreadRolledBack(_)),
THREAD_ROLLBACK_EVENT_TIMEOUT,
)
let rollback_event = wait_for_event(&conversation, |ev| {
matches!(ev, EventMsg::ThreadRolledBack(_))
})
.await;
let EventMsg::ThreadRolledBack(rollback_event) = rollback_event else {
panic!("expected thread rolled back event");

View File

@@ -34,15 +34,11 @@ use core_test_support::test_codex::TestCodex;
use core_test_support::test_codex::test_codex;
use core_test_support::test_codex::turn_permission_fields;
use core_test_support::wait_for_event;
use core_test_support::wait_for_event_with_timeout;
use pretty_assertions::assert_eq;
use std::path::Path;
use std::path::PathBuf;
use tokio::time::Duration;
use wiremock::MockServer;
const THREAD_ROLLBACK_EVENT_TIMEOUT: Duration = Duration::from_secs(120);
fn read_only_user_turn(test: &TestCodex, items: Vec<UserInput>, model: String) -> Op {
let (sandbox_policy, permission_profile) =
turn_permission_fields(PermissionProfile::read_only(), test.cwd_path());
@@ -798,11 +794,9 @@ async fn thread_rollback_after_generated_image_drops_entire_image_turn_history()
test.codex
.submit(Op::ThreadRollback { num_turns: 1 })
.await?;
wait_for_event_with_timeout(
&test.codex,
|ev| matches!(ev, EventMsg::ThreadRolledBack(_)),
THREAD_ROLLBACK_EVENT_TIMEOUT,
)
wait_for_event(&test.codex, |ev| {
matches!(ev, EventMsg::ThreadRolledBack(_))
})
.await;
test.codex