diff --git a/tests/integration/test_heartbeat_sender.py b/tests/integration/test_heartbeat_sender.py index d81402c0..8956fdbf 100644 --- a/tests/integration/test_heartbeat_sender.py +++ b/tests/integration/test_heartbeat_sender.py @@ -25,7 +25,7 @@ # ================================================================================================= # ↓ BOOTCAMPERS MODIFY BELOW THIS COMMENT ↓ # ================================================================================================= -# Add your own constants here +controller = worker_controller.WorkerController() # ================================================================================================= # ↑ BOOTCAMPERS MODIFY ABOVE THIS COMMENT ↑ @@ -44,13 +44,11 @@ def start_drone() -> None: # ================================================================================================= # ↓ BOOTCAMPERS MODIFY BELOW THIS COMMENT ↓ # ================================================================================================= -def stop( - args, # Add any necessary arguments -) -> None: +def stop() -> None: """ Stop the workers. """ - pass # Add logic to stop your worker + controller.request_exit() # Add logic to stop your worker # ================================================================================================= @@ -95,10 +93,12 @@ def main() -> int: # Create a worker controller for your worker # Just set a timer to stop the worker after a while, since the worker infinite loops - threading.Timer(HEARTBEAT_PERIOD * NUM_TRIALS, stop, (args,)).start() + threading.Timer(HEARTBEAT_PERIOD * NUM_TRIALS, stop).start() heartbeat_sender_worker.heartbeat_sender_worker( # Place your own arguments here + connection, + controller, ) # ============================================================================================= # ↑ BOOTCAMPERS MODIFY ABOVE THIS COMMENT ↑