[Cache] Forward fast prefix matching capability (#37844)
This commit is contained in:
@@ -31,11 +31,14 @@ class TestSchedulePolicyWaitingQueueMatching(unittest.TestCase):
|
||||
policy.tree_cache = SimpleNamespace(supports_fast_match_prefix=lambda: True)
|
||||
self.assertTrue(policy.waiting_queue_prefix_matched([]))
|
||||
|
||||
def test_lpm_queue_limit_can_disable_matching(self):
|
||||
def test_lpm_queue_limit_respects_fast_matching_capability(self):
|
||||
policy = self.make_policy(CacheAwarePolicy.LPM, False)
|
||||
self.assertTrue(policy.waiting_queue_prefix_matched([None] * 128))
|
||||
self.assertFalse(policy.waiting_queue_prefix_matched([None] * 129))
|
||||
|
||||
policy.tree_cache = SimpleNamespace(supports_fast_match_prefix=lambda: True)
|
||||
self.assertTrue(policy.waiting_queue_prefix_matched([None] * 129))
|
||||
|
||||
|
||||
class TestSchedulerLoadInquirer(unittest.TestCase):
|
||||
def make_inquirer(self, waiting_queue_prefix_matched):
|
||||
|
||||
Reference in New Issue
Block a user