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

Method test_wait_timeout_preempted

tornado/test/locks_test.py:113–120  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

111
112 @gen_test
113 def test_wait_timeout_preempted(self):
114 c = locks.Condition()
115
116 # This fires before the wait times out.
117 self.io_loop.call_later(0.01, c.notify)
118 wait = c.wait(timedelta(seconds=0.02))
119 yield gen.sleep(0.03)
120 yield wait # No TimeoutError.
121
122 @gen_test
123 def test_notify_n_with_timeout(self):

Callers

nothing calls this directly

Calls 2

waitMethod · 0.95
call_laterMethod · 0.80

Tested by

no test coverage detected