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 ec18b6c562..89852a5fb4 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 void mucDestroyTest() throws TimeoutException, Exception { 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 void roomDestroyed(MultiUserChat alternateMUC, String reason) { 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).");