mirror of
https://github.com/vale981/ray
synced 2025-03-07 02:51:39 -05:00
[serve] Clean up kv store file, skip on windows (#19194)
This commit is contained in:
parent
44b0b6eb20
commit
93bcea7bdd
1 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
from typing import Any, Dict, List, Optional, Tuple
|
from typing import Any, Dict, List, Optional, Tuple
|
||||||
from unittest.mock import patch, Mock
|
from unittest.mock import patch, Mock
|
||||||
|
@ -1859,6 +1861,9 @@ def mock_backend_state_manager(
|
||||||
yield backend_state_manager, timer, goal_manager
|
yield backend_state_manager, timer, goal_manager
|
||||||
# Clear checkpoint at the end of each test
|
# Clear checkpoint at the end of each test
|
||||||
kv_store.delete(CHECKPOINT_KEY)
|
kv_store.delete(CHECKPOINT_KEY)
|
||||||
|
if sys.platform != "win32":
|
||||||
|
# This line fails on windows with a PermissionError.
|
||||||
|
os.remove("test_kv_store.db")
|
||||||
|
|
||||||
|
|
||||||
def test_shutdown(mock_backend_state_manager):
|
def test_shutdown(mock_backend_state_manager):
|
||||||
|
@ -1974,5 +1979,4 @@ def test_resume_backend_state_from_replica_tags(mock_backend_state_manager):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import sys
|
|
||||||
sys.exit(pytest.main(["-v", "-s", __file__]))
|
sys.exit(pytest.main(["-v", "-s", __file__]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue