Skip to content

Commit e53b65d

Browse files
authored
avoid racey flakes in test_client_storage (#5920)
1 parent b6b7f32 commit e53b65d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/test_client_storage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,8 @@ def set_sub_sub(var: str, value: str):
659659
and isinstance(app_state_manager, StateManagerDisk)
660660
):
661661
# Purge the backend's disk manager
662-
del app_state_manager.states[token]
663-
del app_state_manager._write_queue[token]
662+
app_state_manager.states.pop(token, None)
663+
app_state_manager._write_queue.pop(token, None)
664664
og_token_expiration = app_state_manager.token_expiration
665665
app_state_manager.token_expiration = 0
666666
app_state_manager._purge_expired_states()

0 commit comments

Comments
 (0)