mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
Wait for TUI memory mode persistence
This commit is contained in:
+14
-4
@@ -8173,10 +8173,20 @@ mod tests {
|
||||
)
|
||||
.await
|
||||
.expect("state db should initialize");
|
||||
let memory_mode = state_db
|
||||
.get_thread_memory_mode(thread_id)
|
||||
.await
|
||||
.expect("thread memory mode should be readable");
|
||||
let memory_mode = time::timeout(Duration::from_secs(10), async {
|
||||
loop {
|
||||
let memory_mode = state_db
|
||||
.get_thread_memory_mode(thread_id)
|
||||
.await
|
||||
.expect("thread memory mode should be readable");
|
||||
if memory_mode.as_deref() == Some("disabled") {
|
||||
break memory_mode;
|
||||
}
|
||||
time::sleep(Duration::from_millis(50)).await;
|
||||
}
|
||||
})
|
||||
.await
|
||||
.expect("thread memory mode should update");
|
||||
assert_eq!(memory_mode.as_deref(), Some("disabled"));
|
||||
|
||||
app_server.shutdown().await?;
|
||||
|
||||
Reference in New Issue
Block a user