From 2a5cf149b2e321722ee505e50b02e09b18fa6d90 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 21 May 2024 12:38:12 +0200 Subject: [PATCH] [sinttest] Use unique room names for mucJoinSemiAnonymousRoomReceivedBy*() In order to be able to identify potential room leaks, use unique rooms names for the two integration tests. Also destroy the room in mucJoinSemiAnonymousRoomReceivedByNonModeratorTest(). --- .../smackx/muc/MultiUserChatOccupantIntegrationTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatOccupantIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatOccupantIntegrationTest.java index 437b552bd..4caad88d9 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatOccupantIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatOccupantIntegrationTest.java @@ -379,7 +379,7 @@ public class MultiUserChatOccupantIntegrationTest extends AbstractMultiUserChatI "option), but MUST include the new occupant's full JID only in the presence notifications it sends to " + "occupants with a role of \"moderator\" and not to non-moderator occupants.") public void mucJoinSemiAnonymousRoomReceivedByNonModeratorTest() throws Exception { - EntityBareJid mucAddress = getRandomRoom("smack-inttest-joinsemianonymousroom"); + EntityBareJid mucAddress = getRandomRoom("smack-inttest-seminanonymous-by-non-moderator"); MultiUserChat mucAsSeenByOne = mucManagerOne.getMultiUserChat(mucAddress); MultiUserChat mucAsSeenByTwo = mucManagerTwo.getMultiUserChat(mucAddress); @@ -408,7 +408,7 @@ public class MultiUserChatOccupantIntegrationTest extends AbstractMultiUserChatI // Check the presence received by participant two for exclusion of full jid of participant three assertNull(MUCUser.from(presenceReceivedByTwo).getItem().getJid(), "Did not expect '" + conTwo.getUser() + "' (who is not a moderator at this stage) to receive the full JID of '" + conThree.getUser() + "' when they joined room '" + mucAddress + "' (but they did)."); } finally { - mucAsSeenByThree.leave(); // Reset to have a second go + tryDestroy(mucAsSeenByOne); } } @@ -425,7 +425,7 @@ public class MultiUserChatOccupantIntegrationTest extends AbstractMultiUserChatI "option), but MUST include the new occupant's full JID only in the presence notifications it sends to " + "occupants with a role of \"moderator\" and not to non-moderator occupants.") public void mucJoinSemiAnonymousRoomReceivedByModeratorTest() throws Exception { - EntityBareJid mucAddress = getRandomRoom("smack-inttest-joinsemianonymousroom"); + EntityBareJid mucAddress = getRandomRoom("smack-inttest-seminanonymous-by-moderator"); MultiUserChat mucAsSeenByOne = mucManagerOne.getMultiUserChat(mucAddress); MultiUserChat mucAsSeenByTwo = mucManagerTwo.getMultiUserChat(mucAddress);