Create a worker for testing.
(self)
| 224 | """Tests for heartbeat functionality.""" |
| 225 | |
| 226 | def create_worker(self): |
| 227 | """Create a worker for testing.""" |
| 228 | cfg = Config() |
| 229 | cfg.set('workers', 1) |
| 230 | |
| 231 | worker = gtornado.TornadoWorker( |
| 232 | age=1, |
| 233 | ppid=os.getpid(), |
| 234 | sockets=[], |
| 235 | app=mock.Mock(), |
| 236 | timeout=30, |
| 237 | cfg=cfg, |
| 238 | log=mock.Mock(), |
| 239 | ) |
| 240 | return worker |
| 241 | |
| 242 | def test_heartbeat_stops_server_when_not_alive(self): |
| 243 | """Test that heartbeat stops the server when not alive.""" |
no test coverage detected