Skip to content

Commit 1068a41

Browse files
committed
Stabilize TUI memory mode state test
1 parent 5976ceb commit 1068a41

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

codex-rs/tui/src/app.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8154,6 +8154,16 @@ mod tests {
81548154
let codex_home = tempdir()?;
81558155
app.config.codex_home = codex_home.path().to_path_buf().abs();
81568156
app.config.sqlite_home = codex_home.path().to_path_buf();
8157+
let state_db = codex_state::StateRuntime::init(
8158+
codex_home.path().to_path_buf(),
8159+
app.config.model_provider_id.clone(),
8160+
)
8161+
.await
8162+
.expect("state db should initialize");
8163+
state_db
8164+
.mark_backfill_complete(/*last_watermark*/ None)
8165+
.await
8166+
.expect("state db backfill should be marked complete");
81578167

81588168
let mut app_server = crate::start_embedded_app_server_for_picker(&app.config).await?;
81598169
let started = app_server.start_thread(&app.config).await?;
@@ -8167,12 +8177,6 @@ mod tests {
81678177
)
81688178
.await;
81698179

8170-
let state_db = codex_state::StateRuntime::init(
8171-
codex_home.path().to_path_buf(),
8172-
app.config.model_provider_id.clone(),
8173-
)
8174-
.await
8175-
.expect("state db should initialize");
81768180
let memory_mode = time::timeout(Duration::from_secs(10), async {
81778181
loop {
81788182
let memory_mode = state_db

0 commit comments

Comments
 (0)