From 7361b8a79b89bcd183f93ea21ff17539b78461fb Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Sun, 9 Jun 2019 10:29:07 +0300 Subject: [PATCH] test: verify connect() after close() --- unit/suites/test_reconnect.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/unit/suites/test_reconnect.py b/unit/suites/test_reconnect.py index 7a6a746e..24470bae 100644 --- a/unit/suites/test_reconnect.py +++ b/unit/suites/test_reconnect.py @@ -66,6 +66,23 @@ def test_02_wrong_auth(self): con.close() self.srv.stop() + def test_03_connect_after_close(self): + # Start a server and connect to it. + self.srv.start() + con = tarantool.Connection(self.srv.host, self.srv.args['primary']) + con.ping() + + # Close the connection and connect again. + con.close() + con.connect() + + # Verify that the connection is alive. + con.ping() + + # Close the connection and stop the server. + con.close() + self.srv.stop() + @classmethod def tearDownClass(self): self.srv.clean()