MCPcopy Create free account
hub / github.com/celery/celery / test_loop_ignores_socket_timeout

Method test_loop_ignores_socket_timeout

t/unit/worker/test_worker.py:324–337  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

322 c.timer and c.timer.stop()
323
324 def test_loop_ignores_socket_timeout(self):
325
326 class Connection(self.app.connection_for_read().__class__):
327 obj = None
328
329 def drain_events(self, **kwargs):
330 self.obj.connection = None
331 raise socket.timeout(10)
332
333 c = self.NoopConsumer()
334 c.connection = Connection(self.app.conf.broker_url)
335 c.connection.obj = c
336 c.qos = QoS(c.task_consumer.qos, 10)
337 c.loop(*c.loop_args())
338
339 def test_loop_when_socket_error(self):
340

Callers

nothing calls this directly

Calls 4

NoopConsumerMethod · 0.95
loopMethod · 0.80
loop_argsMethod · 0.80
ConnectionClass · 0.70

Tested by

no test coverage detected