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 e74bced82c..714ed89e85 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 @@ -184,20 +184,18 @@ public static boolean removeConnectionDescriptor(String nickname) { switch (sinttestConfiguration.accountRegistration) { case serviceAdministration: - case inBandRegistration: accountRegistrationConnection = defaultConnectionDescriptor.construct(sinttestConfiguration); accountRegistrationConnection.connect(); accountRegistrationConnection.login(sinttestConfiguration.adminAccountUsername, sinttestConfiguration.adminAccountPassword); - - if (sinttestConfiguration.accountRegistration == AccountRegistration.inBandRegistration) { - - adminManager = null; - accountManager = AccountManager.getInstance(accountRegistrationConnection); - } else { - adminManager = ServiceAdministrationManager.getInstanceFor(accountRegistrationConnection); - accountManager = null; - } + adminManager = ServiceAdministrationManager.getInstanceFor(accountRegistrationConnection); + accountManager = null; + break; + case inBandRegistration: + accountRegistrationConnection = defaultConnectionDescriptor.construct(sinttestConfiguration); + accountRegistrationConnection.connect(); + adminManager = null; + accountManager = AccountManager.getInstance(accountRegistrationConnection); break; case disabled: accountRegistrationConnection = null; @@ -287,7 +285,7 @@ void disconnectAndCleanup() throws InterruptedException { if (unsuccessfullyDeletedAccountsCount == 0) { LOGGER.info("Successfully deleted all created accounts ✔"); } else { - LOGGER.warning("Could not delete all created accounts, " + unsuccessfullyDeletedAccountsCount + " remainaing"); + LOGGER.warning("Could not delete all created accounts, " + unsuccessfullyDeletedAccountsCount + " remaining"); } } @@ -366,11 +364,11 @@ private void registerAccount(String username, String password) throws NoResponse break; case inBandRegistration: if (!accountManager.supportsAccountCreation()) { - throw new UnsupportedOperationException("Account creation/registation is not supported"); + throw new UnsupportedOperationException("Account creation/registration is not supported"); } Set requiredAttributes = accountManager.getAccountAttributes(); if (requiredAttributes.size() > 4) { - throw new IllegalStateException("Unkown required attributes"); + throw new IllegalStateException("Unknown required attributes"); } Map additionalAttributes = new HashMap<>(); additionalAttributes.put("name", "Smack Integration Test");