(self)
| 1092 | |
| 1093 | @testing.requires.timing_intensive |
| 1094 | def test_timeout(self): |
| 1095 | p = self._queuepool_fixture(pool_size=3, max_overflow=0, timeout=2) |
| 1096 | c1 = p.connect() # noqa |
| 1097 | c2 = p.connect() # noqa |
| 1098 | c3 = p.connect() # noqa |
| 1099 | now = time.time() |
| 1100 | |
| 1101 | assert_raises(tsa.exc.TimeoutError, p.connect) |
| 1102 | assert int(time.time() - now) == 2 |
| 1103 | |
| 1104 | def test_timeout_subsecond_precision(self): |
| 1105 | """test that a subsecond precision is passed to queue.get() |
nothing calls this directly
no test coverage detected