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

Method test_two_families_timeout

tornado/test/tcpclient_test.py:300–309  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

298 self.assertEqual(future.result(), (AF2, "c", self.streams["c"]))
299
300 def test_two_families_timeout(self):
301 conn, future = self.start_connect(self.addrinfo)
302 self.assert_pending((AF1, "a"))
303 conn.on_timeout()
304 self.assert_pending((AF1, "a"), (AF2, "c"))
305 self.resolve_connect(AF2, "c", True)
306 self.assertEqual(future.result(), (AF2, "c", self.streams["c"]))
307 # resolving 'a' after the connection has completed doesn't start 'b'
308 self.resolve_connect(AF1, "a", False)
309 self.assert_pending()
310
311 def test_success_after_timeout(self):
312 conn, future = self.start_connect(self.addrinfo)

Callers

nothing calls this directly

Calls 5

start_connectMethod · 0.95
assert_pendingMethod · 0.95
resolve_connectMethod · 0.95
resultMethod · 0.80
on_timeoutMethod · 0.45

Tested by

no test coverage detected