mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
test(parallel_request_limiter_v3): clear force_redis_hash_tag_grouping flag before default-behaviour assertion
Greptile flagged the default-behaviour assertion as fragile under test ordering: another test that sets litellm.force_redis_hash_tag_grouping and exits without clearing would carry the flag into this test's default-path check. Reset the flag explicitly at the top.
This commit is contained in:
parent
6e8aa3d213
commit
12dce42b35
1 changed files with 3 additions and 0 deletions
|
|
@ -1880,6 +1880,9 @@ def test_group_keys_by_hash_tag_force_grouping_flag():
|
|||
"{team:1f44b322-dead-41d9-9244-09515df45269}:tokens",
|
||||
]
|
||||
|
||||
# Defensive: clear any prior test leakage before asserting default behaviour.
|
||||
setattr(litellm, "force_redis_hash_tag_grouping", False)
|
||||
|
||||
# Default: no flag, non-cluster cache -> single group (current behaviour).
|
||||
groups_default = handler._group_keys_by_hash_tag(keys_two_slots)
|
||||
assert len(groups_default) == 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue