def test_process_messages(self, m_proc_msgs, m_ish, m_context): config = { "zmq": { "host": "localhost", "ports": { "logging": { "worker": 4343 } } } } log_aggregator.run(config) m_proc_msgs.assert_called_once_with(m_context.socket())
def test_install_signal_handlers(self, m_proc_msgs, m_ish, m_context): config = { "zmq": { "host": "localhost", "ports": { "logging": { "worker": 4343 } } } } log_aggregator.run(config) m_ish.assert_called_once_with(m_context.socket())
def test_remote_worker(self, m_proc_msgs, m_ish, m_context): config = { "zmq": { "host": "localhost", "ports": { "logging": { "manager": "salish:4348" } }, } } log_aggregator.run(config) m_context.socket( zmq.SUB).connect.assert_called_once_with("tcp://salish:4348")
def test_manager_port(self, m_proc_msgs, m_ish, m_context): config = { "zmq": { "host": "localhost", "ports": { "logging": { "manager": 4343 } } } } log_aggregator.run(config) m_context.socket( zmq.SUB).connect.assert_called_once_with("tcp://localhost:4343")
def test_local_worker_ports_list(self, m_proc_msgs, m_ish, m_context): config = { "zmq": { "host": "localhost", "ports": { "logging": { "workers": [4345, 4346] } }, } } log_aggregator.run(config) assert m_context.socket(zmq.SUB).connect.call_args_list == [ call("tcp://localhost:4345"), call("tcp://localhost:4346"), ]