mirror of
https://github.com/openai/codex.git
synced 2026-11-06 20:20:34 +00:00
brittle test fix
This commit is contained in:
@@ -74,7 +74,14 @@ async fn emits_warning_when_resumed_model_differs() {
|
||||
.expect("resume conversation");
|
||||
|
||||
// Assert: a Warning event is emitted describing the model mismatch.
|
||||
let warning = wait_for_event(&conversation, |ev| matches!(ev, EventMsg::Warning(_))).await;
|
||||
let warning = wait_for_event(&conversation, |ev| {
|
||||
matches!(
|
||||
ev,
|
||||
EventMsg::Warning(WarningEvent { message })
|
||||
if message.contains("previous-model") && message.contains("current-model")
|
||||
)
|
||||
})
|
||||
.await;
|
||||
let EventMsg::Warning(WarningEvent { message }) = warning else {
|
||||
panic!("expected warning event");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user