From a9673408ccae27ff3a30c4690cf7b17f04a1a91d Mon Sep 17 00:00:00 2001 From: Guus der Kinderen Date: Mon, 8 Apr 2019 16:10:29 +0200 Subject: [PATCH] Admin should be disconnected after tests. The Smack Integration tests can use an admin account to provision accounts that are used by the tests. This admin account uses an XMPP connection to interact with the server-under-test. When the tests are over, this account should be disconnected explicitly, to prevent stream management from keeping it alive longer than it needs to. --- .../igniterealtime/smack/inttest/XmppConnectionManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java index ad076ccf2..4ea5531c3 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java @@ -240,6 +240,10 @@ public class XmppConnectionManager { } connections.clear(); + + if (accountRegistrationConnection != null) { + accountRegistrationConnection.disconnect(); + } }