tests reconnect operations at the pool level. SA's engine/dialect includes another layer of reconnect support for 'database was lost' errors.
(self)
| 1910 | assert p2._max_overflow == 0 |
| 1911 | |
| 1912 | def test_reconnect(self): |
| 1913 | class="st">"""tests reconnect operations at the pool level. SA&class="cm">#x27;s |
| 1914 | engine/dialect includes another layer of reconnect support for |
| 1915 | &class="cm">#x27;database was lost' errors.class="st">""" |
| 1916 | |
| 1917 | dbapi, p = self._queuepool_dbapi_fixture(pool_size=1, max_overflow=0) |
| 1918 | c1 = p.connect() |
| 1919 | c_id = c1.dbapi_connection.id |
| 1920 | c1.close() |
| 1921 | c1 = None |
| 1922 | c1 = p.connect() |
| 1923 | assert c1.dbapi_connection.id == c_id |
| 1924 | dbapi.raise_error = True |
| 1925 | c1.invalidate() |
| 1926 | c1 = None |
| 1927 | c1 = p.connect() |
| 1928 | assert c1.dbapi_connection.id != c_id |
| 1929 | |
| 1930 | def test_detach(self): |
| 1931 | dbapi, p = self._queuepool_dbapi_fixture(pool_size=1, max_overflow=0) |
nothing calls this directly
no test coverage detected