Commit 3cc71593 authored by Samuel GAIST's avatar Samuel GAIST

[test][bcp] Typo and code fixes

parent c2b93143
Pipeline #34097 passed with stage
in 40 minutes and 42 seconds
......@@ -173,7 +173,7 @@ class ZMQWorkerProcess(multiprocessing.Process):
# ----------------------------------------------------------
class ExcecutionTestCase(unittest.TestCase):
class ExecutionTestCase(unittest.TestCase):
def setUp(self):
self.MAX_ITERATION_COUNT = int(
os.environ.get("BPC_MAX_ITERATION_COUNT", DEFAULT_MAX_ITERATION_COUNT)
......@@ -232,7 +232,7 @@ class TestBroker(unittest.TestCase):
self.assertEqual(queue_messages[1], "gone")
class TestBCP(ExcecutionTestCase):
class TestBCP(ExecutionTestCase):
use_docker = False
docker_images_cache = None
......@@ -352,16 +352,21 @@ class TestBCPDocker(TestBCP):
cls.host = Host(images_cache=cls.docker_images_cache, raise_on_errors=False)
class TestExcecutionProcess(ExcecutionTestCase):
address = "ipc://execution_feed"
class TestExecutionProcess(ExecutionTestCase):
REMOTE_ADDRESS = "ipc://execution_feed"
def tearDown(self):
os.remove(self.address.split("//")[1])
os.remove(self.REMOTE_ADDRESS.split("//")[1])
def setup_process(self):
self.prepare_databases(CONFIGURATION1)
process = ExecutionProcess(
self.address, b"1", prefix, CONFIGURATION1, tmp_prefix, VERBOSE_BCP_LOGGING
self.REMOTE_ADDRESS,
b"1",
prefix,
CONFIGURATION1,
tmp_prefix,
VERBOSE_BCP_LOGGING,
)
process.start()
return process
......@@ -370,7 +375,7 @@ class TestExcecutionProcess(ExcecutionTestCase):
ctx = zmq.Context()
socket = ctx.socket(zmq.ROUTER)
socket.linger = 0
socket.bind(self.address)
socket.bind(self.REMOTE_ADDRESS)
poller = zmq.Poller()
poller.register(socket, zmq.POLLIN)
......@@ -410,7 +415,9 @@ class TestExcecutionProcess(ExcecutionTestCase):
def test_processor(self):
poller = zmq.Poller()
processor = BeatComputationProcessor(poller, self.address, VERBOSE_BCP_LOGGING)
processor = BeatComputationProcessor(
poller, self.REMOTE_ADDRESS, VERBOSE_BCP_LOGGING
)
process = self.setup_process()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment