コード例 #1
0
 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())
コード例 #2
0
 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())
コード例 #3
0
 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")
コード例 #4
0
 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")
コード例 #5
0
 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"),
     ]