Ejemplo n.º 1
0
 def test_bind_signal_handlers(self, signal_mock):
     main.bind_signal_handlers(os.getpid())
     # Check if on SIGINT/SIGTERM agent is configured to terminate
     signal_mock.assert_any_call(signal.SIGINT,
                                 HeartbeatHandlers.signal_handler)
     signal_mock.assert_any_call(signal.SIGTERM,
                                 HeartbeatHandlers.signal_handler)
Ejemplo n.º 2
0
 def test_bind_signal_handlers(self, signal_mock):
   main.bind_signal_handlers(os.getpid())
   # Check if on SIGINT/SIGTERM agent is configured to terminate
   signal_mock.assert_any_call(signal.SIGINT, HeartbeatHandlers.signal_handler)
   signal_mock.assert_any_call(signal.SIGTERM, HeartbeatHandlers.signal_handler)
   # Check if on SIGUSR1 agent is configured to fall into debug
   signal_mock.assert_any_call(signal.SIGUSR1, HeartbeatHandlers.debug)
Ejemplo n.º 3
0
 def test_bind_signal_handlers(self, signal_mock):
   main.bind_signal_handlers()
   # Check if on SIGINT/SIGTERM agent is configured to terminate
   signal_mock.assert_any_call(signal.SIGINT, main.signal_handler)
   signal_mock.assert_any_call(signal.SIGTERM, main.signal_handler)
   # Check if on SIGUSR1 agent is configured to fall into debug
   signal_mock.assert_any_call(signal.SIGUSR1, main.debug)
Ejemplo n.º 4
0
 def test_bind_signal_handlers(self, signal_mock):
   main.bind_signal_handlers()
   # Check if on SIGINT/SIGTERM agent is configured to terminate
   signal_mock.assert_any_call(signal.SIGINT, main.signal_handler)
   signal_mock.assert_any_call(signal.SIGTERM, main.signal_handler)
   # Check if on SIGUSR1 agent is configured to fall into debug
   signal_mock.assert_any_call(signal.SIGUSR1, main.debug)