From cfe5c2233d062d64af9e636a50cebd113bfef6a4 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 19 Dec 2016 14:13:53 +0100 Subject: [PATCH] Fix integration test using XEP-0133 credentials for the created connections. --- .../smack/inttest/SmackIntegrationTestFramework.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java index 5ce4afc95..1e71f282c 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java @@ -547,16 +547,18 @@ public class SmackIntegrationTestFramework { XMPPTCPConnection connection = new XMPPTCPConnection(builder.build()); connection.connect(); if (config.isAccountRegistrationPossible()) { - IntTestUtil.registerAccount(connection, accountUsername, accountPassword, config); + UsernameAndPassword uap = IntTestUtil.registerAccount(connection, accountUsername, accountPassword, config); // TODO is this still required? // Some servers, e.g. Openfire, do not support a login right after the account was // created, so disconnect and re-connection the connection first. connection.disconnect(); connection.connect(); - } - connection.login(); + connection.login(uap.username, uap.password); + } else { + connection.login(); + } return connection; }