Belle II Software development
DyingWorkerTestCase Class Reference
Inheritance diagram for DyingWorkerTestCase:
WorkerTestCase HLTZMQTestCase

Public Member Functions

def testUnregistration (self)
 

Static Public Attributes

list extra_arguments = ["--exit", "--prefix", "dying_"]
 set the extra arguments we need ...
 

Detailed Description

Test case for dying workers

Definition at line 142 of file test_worker.py.

Member Function Documentation

◆ testUnregistration()

def testUnregistration (   self)
test function

Definition at line 148 of file test_worker.py.

148 def testUnregistration(self):
149 """test function"""
150 self.start()
151
152 # lets send some events
153 for _ in range(10):
154 self.send(self.input_socket, "u", first_data=self.event_data, identity=self.input_identity)
155 self.assertIsMsgType(self.output_socket, "w", router=True)
156 self.send(self.output_socket, "c", identity=self.output_identity)
157
158 self.assertHasOutputFile("dying_beginrun_called", timeout=1)
159
160 # Now we kill one of the workers
161 Path("dying_exit_request").touch()
162
163 self.send(self.input_socket, "u", first_data=self.event_data, identity=self.input_identity)
164 self.assertHasOutputFile("dying_exit_called", timeout=1)
165 msg = self.assertIsMsgType(self.output_socket, "d", router=True)
166 # the message content should be the worker that has died
167 self.assertEqual(msg[2].decode(), self.output_identity)
168 self.send(self.output_socket, "c", identity=msg[0].decode())
169
170 self.assertIsDown("worker", timeout=10)
171
172

Member Data Documentation

◆ extra_arguments

list extra_arguments = ["--exit", "--prefix", "dying_"]
static

set the extra arguments we need ...

Definition at line 146 of file test_worker.py.


The documentation for this class was generated from the following file: