1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-25 12:08:00 +01:00

[sinttest] Add ejabberd compatibility mode for mucJoinEventOrderingTest

This commit is contained in:
Florian Schmaus 2024-10-18 15:55:57 +02:00
parent 7e8fddcbf8
commit 75636884ad

View file

@ -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 + "'.");