File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -8127,10 +8127,20 @@ mod tests {
81278127 )
81288128 . await
81298129 . expect ( "state db should initialize" ) ;
8130- let memory_mode = state_db
8131- . get_thread_memory_mode ( thread_id)
8132- . await
8133- . expect ( "thread memory mode should be readable" ) ;
8130+ let memory_mode = time:: timeout ( Duration :: from_secs ( 10 ) , async {
8131+ loop {
8132+ let memory_mode = state_db
8133+ . get_thread_memory_mode ( thread_id)
8134+ . await
8135+ . expect ( "thread memory mode should be readable" ) ;
8136+ if memory_mode. as_deref ( ) == Some ( "disabled" ) {
8137+ break memory_mode;
8138+ }
8139+ time:: sleep ( Duration :: from_millis ( 50 ) ) . await ;
8140+ }
8141+ } )
8142+ . await
8143+ . expect ( "thread memory mode should update" ) ;
81348144 assert_eq ! ( memory_mode. as_deref( ) , Some ( "disabled" ) ) ;
81358145
81368146 app_server. shutdown ( ) . await ?;
You can’t perform that action at this time.
0 commit comments