[Bugfix][EC Connector] Don't create hash directories on cache-miss lookups in ECExampleConnector (#60826)

Signed-off-by: zhouyou9505 <zhouyou9505@gmail.com>
This commit is contained in:
zhouyou
2026-10-13 15:59:48 +08:00
committed by GitHub
parent 2cc2e68d1c
commit 3ad096faf8
2 changed files with 20 additions and 6 deletions
@@ -246,6 +246,18 @@ class TestCacheExistence:
assert result[1] # Second exists
assert not result[2] # Third doesn't exist
def test_has_cache_item_miss_creates_no_folder(
self, mock_vllm_config_consumer, temp_storage
):
"""Test a cache miss leaves no empty folder in the shared storage."""
connector = ECExampleConnector(
vllm_config=mock_vllm_config_consumer,
role=ECConnectorRole.SCHEDULER,
)
assert not connector.has_cache_item("missing_hash")
assert os.listdir(temp_storage) == []
class TestStateManagement:
"""Test connector state management."""