1616from aiida .brokers .zmq .queue import PersistentQueue
1717from aiida .brokers .zmq .server import ZmqBrokerServer
1818from aiida .brokers .zmq .service import ZmqBrokerService
19- from tests .conftest import _start_zmq_broker , _stop_zmq_broker
19+ from tests .conftest import start_zmq_broker , stop_zmq_broker
2020
2121
2222class TestZmqDefaults :
@@ -54,48 +54,48 @@ def test_endpoints_no_sockets_file(self, tmp_path):
5454 def test_start_stop_cycle (self , tmp_path ):
5555 """Test querying a running broker service."""
5656 broker = ZmqBroker .from_base_path (tmp_path )
57- _start_zmq_broker (broker )
57+ start_zmq_broker (broker )
5858
5959 try :
6060 assert broker .is_running ()
6161 assert broker .get_service_pid () is not None
6262 assert broker .router_endpoint is not None
6363 finally :
64- _stop_zmq_broker (broker )
64+ stop_zmq_broker (broker )
6565
6666 assert not broker .is_running ()
6767
6868 def test_start_already_running (self , tmp_path ):
6969 """Test starting when already running is idempotent."""
7070 broker = ZmqBroker .from_base_path (tmp_path )
71- _start_zmq_broker (broker )
71+ start_zmq_broker (broker )
7272
7373 try :
74- _start_zmq_broker (broker ) # idempotent
74+ start_zmq_broker (broker ) # idempotent
7575 assert broker .is_running ()
7676 finally :
77- _stop_zmq_broker (broker )
77+ stop_zmq_broker (broker )
7878
7979 def test_stop_not_running (self , tmp_path ):
8080 """Test stopping when not running is a no-op."""
8181 broker = ZmqBroker .from_base_path (tmp_path )
82- _stop_zmq_broker (broker ) # Should not raise
82+ stop_zmq_broker (broker ) # Should not raise
8383
8484 def test_restart (self , tmp_path ):
8585 """Test restarting the broker service."""
8686 broker = ZmqBroker .from_base_path (tmp_path )
87- _start_zmq_broker (broker )
87+ start_zmq_broker (broker )
8888
8989 try :
9090 old_pid = broker .get_service_pid ()
91- _stop_zmq_broker (broker )
92- _start_zmq_broker (broker )
91+ stop_zmq_broker (broker )
92+ start_zmq_broker (broker )
9393 assert broker .is_running ()
9494
9595 new_pid = broker .get_service_pid ()
9696 assert new_pid != old_pid
9797 finally :
98- _stop_zmq_broker (broker )
98+ stop_zmq_broker (broker )
9999
100100
101101class TestZmqBrokerServer :
@@ -254,7 +254,7 @@ class TestZmqCommunicator:
254254 def test_init (self , tmp_path ):
255255 """Test communicator initialization."""
256256 broker = ZmqBroker .from_base_path (tmp_path )
257- _start_zmq_broker (broker )
257+ start_zmq_broker (broker )
258258
259259 try :
260260 communicator = ZmqCommunicator (
@@ -269,12 +269,12 @@ def test_init(self, tmp_path):
269269
270270 assert communicator .is_closed () is True
271271 finally :
272- _stop_zmq_broker (broker )
272+ stop_zmq_broker (broker )
273273
274274 def test_context_manager (self , tmp_path ):
275275 """Test communicator as context manager."""
276276 broker = ZmqBroker .from_base_path (tmp_path )
277- _start_zmq_broker (broker )
277+ start_zmq_broker (broker )
278278
279279 try :
280280 with ZmqCommunicator (
@@ -284,7 +284,7 @@ def test_context_manager(self, tmp_path):
284284
285285 assert communicator .is_closed () is True
286286 finally :
287- _stop_zmq_broker (broker )
287+ stop_zmq_broker (broker )
288288
289289
290290class TestZmqBrokerIntegration :
@@ -295,11 +295,11 @@ def zmq_broker(self, tmp_path):
295295 """Create a ZMQ broker for testing."""
296296 broker_dir = tmp_path / 'broker' / 'test-uuid'
297297 broker = ZmqBroker .from_base_path (broker_dir )
298- _start_zmq_broker (broker )
298+ start_zmq_broker (broker )
299299
300300 yield broker
301301
302- _stop_zmq_broker (broker )
302+ stop_zmq_broker (broker )
303303
304304 def test_broker_lifecycle (self , zmq_broker ):
305305 """Test the broker lifecycle."""
0 commit comments