From 1e1576473b3b14357db1cf7a7b2707ade3bd6ab3 Mon Sep 17 00:00:00 2001
From: mathieui <mathieui@mathieui.net>
Date: Fri, 29 Jan 2021 16:48:30 +0100
Subject: tests: add basic reconnect/connect integration tests

---
 itests/test_reconnect.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 itests/test_reconnect.py

diff --git a/itests/test_reconnect.py b/itests/test_reconnect.py
new file mode 100644
index 00000000..8318af64
--- /dev/null
+++ b/itests/test_reconnect.py
@@ -0,0 +1,25 @@
+import unittest
+from slixmpp.test.integration import SlixIntegration
+
+
+class TestReconnect(SlixIntegration):
+    async def asyncSetUp(self):
+        await super().asyncSetUp()
+        self.add_client(
+            self.envjid('CI_ACCOUNT1'),
+            self.envstr('CI_ACCOUNT1_PASSWORD'),
+        )
+        await self.connect_clients()
+
+    async def test_disconnect_connect(self):
+        """Check we can disconnect and connect again"""
+        await self.clients[0].disconnect()
+        self.clients[0].connect()
+        await self.clients[0].wait_until('session_start')
+
+    async def test_reconnect(self):
+        """Check we can reconnect()"""
+        self.clients[0].reconnect()
+        await self.clients[0].wait_until("session_start")
+
+suite = unittest.TestLoader().loadTestsFromTestCase(TestReconnect)
-- 
cgit v1.2.3