@@ -278,7 +278,7 @@ def test_should_update_if_stale(self):
278278 with RoutingPool (address ) as pool :
279279 first_updated_time = pool .routing_table .last_updated_time
280280 pool .routing_table .ttl = 0
281- pool .ensure_routing_table (WRITE_ACCESS )
281+ pool .ensure_routing_table_is_fresh (WRITE_ACCESS )
282282 second_updated_time = pool .routing_table .last_updated_time
283283 assert second_updated_time != first_updated_time
284284 assert not pool .missing_writer
@@ -287,9 +287,9 @@ def test_should_not_update_if_fresh(self):
287287 with StubCluster ({9001 : "router.script" }):
288288 address = ("127.0.0.1" , 9001 )
289289 with RoutingPool (address ) as pool :
290- pool .ensure_routing_table (WRITE_ACCESS )
290+ pool .ensure_routing_table_is_fresh (WRITE_ACCESS )
291291 first_updated_time = pool .routing_table .last_updated_time
292- pool .ensure_routing_table (WRITE_ACCESS )
292+ pool .ensure_routing_table_is_fresh (WRITE_ACCESS )
293293 second_updated_time = pool .routing_table .last_updated_time
294294 assert second_updated_time == first_updated_time
295295 assert not pool .missing_writer
@@ -300,7 +300,7 @@ def test_should_flag_reading_without_writer(self):
300300 with RoutingPool (address ) as pool :
301301 assert not pool .routing_table .is_fresh (READ_ACCESS )
302302 assert not pool .routing_table .is_fresh (WRITE_ACCESS )
303- pool .ensure_routing_table (READ_ACCESS )
303+ pool .ensure_routing_table_is_fresh (READ_ACCESS )
304304 assert pool .missing_writer
305305
306306 # TODO: fix flaky test
@@ -486,7 +486,7 @@ def test_should_remove_router_from_routing_table_if_present(self):
486486 with StubCluster ({9001 : "router.script" }):
487487 address = ("127.0.0.1" , 9001 )
488488 with RoutingPool (address ) as pool :
489- pool .ensure_routing_table (WRITE_ACCESS )
489+ pool .ensure_routing_table_is_fresh (WRITE_ACCESS )
490490 target = ("127.0.0.1" , 9001 )
491491 assert target in pool .routing_table .routers
492492 pool .remove (target )
@@ -496,7 +496,7 @@ def test_should_remove_reader_from_routing_table_if_present(self):
496496 with StubCluster ({9001 : "router.script" }):
497497 address = ("127.0.0.1" , 9001 )
498498 with RoutingPool (address ) as pool :
499- pool .ensure_routing_table (WRITE_ACCESS )
499+ pool .ensure_routing_table_is_fresh (WRITE_ACCESS )
500500 target = ("127.0.0.1" , 9004 )
501501 assert target in pool .routing_table .readers
502502 pool .remove (target )
@@ -506,7 +506,7 @@ def test_should_remove_writer_from_routing_table_if_present(self):
506506 with StubCluster ({9001 : "router.script" }):
507507 address = ("127.0.0.1" , 9001 )
508508 with RoutingPool (address ) as pool :
509- pool .ensure_routing_table (WRITE_ACCESS )
509+ pool .ensure_routing_table_is_fresh (WRITE_ACCESS )
510510 target = ("127.0.0.1" , 9006 )
511511 assert target in pool .routing_table .writers
512512 pool .remove (target )
@@ -516,6 +516,6 @@ def test_should_not_fail_if_absent(self):
516516 with StubCluster ({9001 : "router.script" }):
517517 address = ("127.0.0.1" , 9001 )
518518 with RoutingPool (address ) as pool :
519- pool .ensure_routing_table (WRITE_ACCESS )
519+ pool .ensure_routing_table_is_fresh (WRITE_ACCESS )
520520 target = ("127.0.0.1" , 9007 )
521521 pool .remove (target )
0 commit comments