diff options
| author | Michael Newman <newmaniese@gmail.com> | 2012-05-27 18:24:35 +0300 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2012-05-27 18:45:08 +0300 |
| commit | 4423757c0c50afbe2470434778c8d5e5b4a70925 (patch) | |
| tree | e9a2f7c83f659656141b6d04f25ee69717f24e41 /tests | |
| parent | a8a81aae20a81e012fddc24f3ede556501af64a2 (diff) | |
Fixed #18135 -- Close connection used for db version checking
On MySQL when checking the server version, a new connection could be
created but never closed. This could result in open connections on
server startup.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/backends/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py index 10e69b65c1..109e1a5bcc 100644 --- a/tests/regressiontests/backends/tests.py +++ b/tests/regressiontests/backends/tests.py @@ -89,6 +89,12 @@ class MySQLTests(TestCase): else: self.assertFalse(found_reset) + @unittest.skipUnless(connection.vendor == 'mysql', + "Test valid only for MySQL") + def test_server_version_connections(self): + connection.close() + connection.mysql_version + self.assertTrue(connection.connection is None) class DateQuotingTest(TestCase): |
