Cleanup tests

This commit is contained in:
Adam Hopkins 2022-12-12 12:04:12 +02:00
parent f034a31d29
commit 232bbce1e0
No known key found for this signature in database
GPG Key ID: 9F85EE6C807303FB

View File

@ -29,7 +29,7 @@ class WorkerManager:
context, context,
monitor_pubsub, monitor_pubsub,
worker_state, worker_state,
restart_order: RestartOrder, restart_order: RestartOrder = RestartOrder.SHUTDOWN_FIRST,
): ):
self.num_server = number self.num_server = number
self.context = context self.context = context
@ -141,8 +141,8 @@ class WorkerManager:
def _sync_states(self): def _sync_states(self):
for process in self.processes: for process in self.processes:
state = self.worker_state[process.name]["state"] state = self.worker_state[process.name].get("state")
if process.state.name != state: if state and process.state.name != state:
process.set_state(ProcessState[state], True) process.set_state(ProcessState[state], True)
def wait_for_ack(self): # no cov def wait_for_ack(self): # no cov