Skip to content

Commit e98c377

Browse files
committed
test: verify connect() after close()
1 parent aa8f115 commit e98c377

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

unit/suites/test_reconnect.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,23 @@ def test_02_wrong_auth(self):
6666
con.close()
6767
self.srv.stop()
6868

69+
def test_03_connect_after_close(self):
70+
# Start a server and connect to it.
71+
self.srv.start()
72+
con = tarantool.Connection(self.srv.host, self.srv.args['primary'])
73+
con.ping()
74+
75+
# Close the connection and connect again.
76+
con.close()
77+
con.connect()
78+
79+
# Verify that the connection is alive.
80+
con.ping()
81+
82+
# Close the connection and stop the server.
83+
con.close()
84+
self.srv.stop()
85+
6986
@classmethod
7087
def tearDownClass(self):
7188
self.srv.clean()

0 commit comments

Comments
 (0)