Skip to content

Commit

Permalink
[sinttest] Add ejabberd compatibility mode for mucJoinEventOrderingTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowdalic committed Oct 18, 2024
1 parent 7e8fddc commit 7563688
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
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;
Expand Down Expand Up @@ -130,6 +131,11 @@ public void mucJoinEventOrderingTest() throws Exception {

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

0 comments on commit 7563688

Please sign in to comment.