diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java index ec18b6c56..89852a5fb 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java @@ -99,6 +99,12 @@ public class MultiUserChatIntegrationTest extends AbstractMultiUserChatIntegrati MultiUserChat muc = mucManagerOne.getMultiUserChat(mucAddress); createMuc(muc, Resourcepart.from("one-" + randomString)); + // These would be a test implementation bug, not assertion failure. + if (!mucManagerOne.getJoinedRooms().contains(mucAddress)) { + tryDestroy(muc); + throw new IllegalStateException("Expected user to have joined a room '" + mucAddress + "' (but does not appear to have done so)."); + } + final SimpleResultSyncPoint mucDestroyed = new SimpleResultSyncPoint(); UserStatusListener userStatusListener = new UserStatusListener() { @@ -110,11 +116,6 @@ public class MultiUserChatIntegrationTest extends AbstractMultiUserChatIntegrati muc.addUserStatusListener(userStatusListener); - // These would be a test implementation bug, not assertion failure. - if (!mucManagerOne.getJoinedRooms().contains(mucAddress)) { - throw new IllegalStateException("Expected user to have joined a room '" + mucAddress + "' (but does not appear to have done so)."); - } - try { muc.destroy("Dummy reason", null); assertResult(mucDestroyed, "Expected " + conOne.getUser() + " to be notified of destruction of room " + mucAddress + " (but was not).");