From 41022d139bb68a04d5593a35a0740d826e7147e7 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 21 May 2024 12:37:26 +0200 Subject: [PATCH] [sinttest] Improve assertion message of mucDestroyTest() Improve the assertion message of mucDestroyTest() by including the still joined rooms. --- .../jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 89852a5fb..b2ff930d6 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 @@ -19,6 +19,7 @@ package org.jivesoftware.smackx.muc; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; +import java.util.Set; import java.util.concurrent.TimeoutException; import org.jivesoftware.smack.MessageListener; @@ -123,7 +124,8 @@ public class MultiUserChatIntegrationTest extends AbstractMultiUserChatIntegrati muc.removeUserStatusListener(userStatusListener); } - assertEquals(0, mucManagerOne.getJoinedRooms().size(), "Expected " + conOne.getUser() + " to no longer be in any rooms after " + mucAddress + " was destroyed (but was)."); + Set joinedRooms = mucManagerOne.getJoinedRooms(); + assertEquals(0, joinedRooms.size(), "Expected " + conOne.getUser() + " to no longer be in any rooms after " + mucAddress + " was destroyed. But it is still in " + joinedRooms); assertEquals(0, muc.getOccupantsCount(), "Expected room " + mucAddress + " to no longer have any occupants after it was destroyed (but it has)."); assertNull(muc.getNickname()); }