@@ -1015,7 +1015,7 @@ def test_11_mixed_batch(self):
10151015 "block_cache_keys" : [block_key ],
10161016 })
10171017 matches = {
1018- item ["host_ip_port" ]: int (item ["local " ])
1018+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
10191019 for item in host_state .get ("hosts" , [])
10201020 }
10211021 self .assertEqual (matches .get (host ), 1 )
@@ -1167,7 +1167,7 @@ def test_16a_heartbeat_timeout_then_recovery(self):
11671167 "block_cache_keys" : [block_key ],
11681168 })
11691169 target_prefixes = {
1170- item ["host_ip_port" ]: int (item ["local " ])
1170+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
11711171 for item in target_host_state .get ("hosts" , [])
11721172 }
11731173 self .assertEqual (target_prefixes .get (host ), 1 )
@@ -1284,7 +1284,7 @@ def test_16a_heartbeat_timeout_then_recovery(self):
12841284 "block_cache_keys" : [block_key ],
12851285 })
12861286 hidden_prefixes = {
1287- item ["host_ip_port" ]: int (item ["local " ])
1287+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
12881288 for item in hidden_host_state .get ("hosts" , [])
12891289 }
12901290 self .assertEqual (
@@ -1388,7 +1388,7 @@ def test_16a_heartbeat_timeout_then_recovery(self):
13881388 "block_cache_keys" : [block_key ],
13891389 })
13901390 recovered_prefixes = {
1391- item ["host_ip_port" ]: int (item ["local " ])
1391+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
13921392 for item in recovered_host_state .get ("hosts" , [])
13931393 }
13941394 self .assertEqual (recovered_prefixes .get (host ), 1 )
@@ -1678,7 +1678,7 @@ def test_16_get_host_cache_state(self):
16781678 "10.0.0.3:8080" : 1 ,
16791679 }
16801680 actual = {
1681- h ["host_ip_port" ]: int (h ["local " ])
1681+ h ["host_ip_port" ]: int (h ["prefix_match_blocks " ])
16821682 for h in resp .get ("hosts" , [])
16831683 }
16841684 for host , prefix in expected .items ():
@@ -1703,7 +1703,7 @@ def test_16_get_host_cache_state(self):
17031703 ["10.0.0.1:8080" , "10.0.0.2:8080" , "10.0.0.3:8080" ],
17041704 )
17051705 large_actual = {
1706- item ["host_ip_port" ]: int (item ["local " ])
1706+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
17071707 for item in large_hosts
17081708 }
17091709 self .assertEqual (large_actual ["10.0.0.1:8080" ], 2 )
@@ -3231,7 +3231,7 @@ def test_26_unregistered_errors_remain_distinct_from_delta_only_mode(self):
32313231 "block_cache_keys" : [25_000_250 ],
32323232 })
32333233 matches = {
3234- item ["host_ip_port" ]: int (item ["local " ])
3234+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
32353235 for item in host_state .get ("hosts" , [])
32363236 }
32373237 self .assertEqual (matches .get (host ), 1 )
@@ -3422,7 +3422,7 @@ def send_first_delta(writer):
34223422 ],
34233423 })
34243424 matches = {
3425- item ["host_ip_port" ]: int (item ["local " ])
3425+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
34263426 for item in host_state .get ("hosts" , [])
34273427 }
34283428 self .assertEqual (matches .get (host ), writer_count )
@@ -3536,7 +3536,7 @@ def test_31_first_delete_without_snapshot_creates_reusable_generation(self):
35363536 "block_cache_keys" : [block_key ],
35373537 })
35383538 empty_matches = {
3539- item ["host_ip_port" ]: int (item ["local " ])
3539+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
35403540 for item in empty_host_state .get ("hosts" , [])
35413541 }
35423542 self .assertNotIn (host , empty_matches )
@@ -3582,7 +3582,7 @@ def test_31_first_delete_without_snapshot_creates_reusable_generation(self):
35823582 "block_cache_keys" : [block_key ],
35833583 })
35843584 visible_matches = {
3585- item ["host_ip_port" ]: int (item ["local " ])
3585+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
35863586 for item in visible_host_state .get ("hosts" , [])
35873587 }
35883588 self .assertEqual (visible_matches .get (host ), 1 )
@@ -4520,7 +4520,7 @@ def test_21_get_host_cache_state_local_scaling(self):
45204520
45214521 def assert_response (response ):
45224522 prefixes = {
4523- item ["host_ip_port" ]: int (item ["local " ])
4523+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
45244524 for item in response .get ("hosts" , [])
45254525 }
45264526 self .assertEqual (prefixes .get (host ), block_count )
@@ -4557,7 +4557,7 @@ def query_worker(worker_index):
45574557 f"worker { worker_index } : status={ code } , body={ body } "
45584558 )
45594559 prefixes = {
4560- item ["host_ip_port" ]: int (item ["local " ])
4560+ item ["host_ip_port" ]: int (item ["prefix_match_blocks " ])
45614561 for item in body .get ("hosts" , [])
45624562 }
45634563 if prefixes .get (host ) != block_count :
0 commit comments