1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

Fix integration test using XEP-0133 credentials

for the created connections.
This commit is contained in:
Florian Schmaus 2016-12-19 14:13:53 +01:00
parent a8a148945f
commit cfe5c2233d

View file

@ -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(uap.username, uap.password);
} else {
connection.login();
}
return connection;
}