mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 12:37:58 +01:00
Fix integration test using XEP-0133 credentials
for the created connections.
This commit is contained in:
parent
a8a148945f
commit
cfe5c2233d
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue