MCPcopy
hub / github.com/tornadoweb/tornado / test_put_timeout_preempted

Method test_put_timeout_preempted

tornado/test/queues_test.py:243–249  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

241
242 @gen_test
243 def test_put_timeout_preempted(self):
244 q = queues.Queue(1) # type: queues.Queue[int]
245 q.put_nowait(0)
246 put = q.put(1, timeout=timedelta(seconds=0.01))
247 q.get()
248 yield gen.sleep(0.02)
249 yield put # No TimeoutError.
250
251 @gen_test
252 def test_put_clears_timed_out_putters(self):

Callers

nothing calls this directly

Calls 3

put_nowaitMethod · 0.95
putMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected