From 75636884ad43d209303570447910c1ca88d5326e Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Fri, 18 Oct 2024 15:55:57 +0200 Subject: [PATCH] [sinttest] Add ejabberd compatibility mode for mucJoinEventOrderingTest --- .../smackx/muc/MultiUserChatOccupantIntegrationTest.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 2b58e4e97..fec746f5b 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 @@ -49,6 +49,7 @@ import org.jivesoftware.smackx.muc.packet.MUCItem; import org.jivesoftware.smackx.muc.packet.MUCUser; import org.igniterealtime.smack.inttest.Configuration; +import org.igniterealtime.smack.inttest.Configuration.CompatibilityMode; import org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment; import org.igniterealtime.smack.inttest.TestNotPossibleException; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; @@ -130,6 +131,11 @@ public class MultiUserChatOccupantIntegrationTest extends AbstractMultiUserChatI subjectResultSyncPoint.waitForResult(timeout); // Wait for subject, as it should be 4th (last) + if (sinttestConfiguration.compatibilityMode == CompatibilityMode.ejabberd) { + // ejabberd MUCs also send their own presence with caps information as very first presence. + results.remove(0); + } + assertEquals(4, results.size(), "Unexpected amount of stanzas received by '" + conTwo.getUser() + "' after it joined room '" + mucAddress + "'. Results: " + results); assertTrue(results.get(0) instanceof Presence, "Expected the first stanza that was received by '" + conTwo.getUser() + "' after it joined room '" + mucAddress + "' to be a presence stanza (but it was not)."); assertEquals(JidCreate.fullFrom(mucAddress, nicknameOne), results.get(0).getFrom(), "Unexpected 'from' address of the first stanza that was received by '" + conTwo.getUser() + "' after it joined room '" + mucAddress + "'.");