Beispiel #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)
 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)
Beispiel #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)
Beispiel #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)