Class AbstractSmackIntegrationTest

java.lang.Object
org.igniterealtime.smack.inttest.AbstractSmackIntTest
org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
Direct Known Subclasses:
AbstractChatIntegrationTest, AbstractMultiUserChatIntegrationTest, AbstractOmemoIntegrationTest, AbstractOpenPgpIntegrationTest, AdHocCommandIntegrationTest, ChatStateIntegrationTest, ChatTest, EntityCapsTest, FileTransferIntegrationTest, FormTest, GeolocationIntegrationTest, HttpFileUploadIntegrationTest, IoTControlIntegrationTest, IoTDataIntegrationTest, IoTDiscoveryIntegrationTest, MamIntegrationTest, MoodIntegrationTest, PingIntegrationTest, PubSubIntegrationTest, RosterIntegrationTest, SoftwareInfoIntegrationTest, UserTuneIntegrationTest, VersionIntegrationTest

public abstract class AbstractSmackIntegrationTest extends AbstractSmackIntTest
  • Field Details

    • conOne

      protected final org.jivesoftware.smack.XMPPConnection conOne
      The first connection.
    • conTwo

      protected final org.jivesoftware.smack.XMPPConnection conTwo
      The second connection.
    • conThree

      protected final org.jivesoftware.smack.XMPPConnection conThree
      The third connection.
    • connection

      protected final org.jivesoftware.smack.XMPPConnection connection
      An alias for the first connection conOne.
    • connections

      protected final List<org.jivesoftware.smack.XMPPConnection> connections
  • Constructor Details

  • Method Details

    • performActionAndWaitForPresence

      protected void performActionAndWaitForPresence(org.jivesoftware.smack.XMPPConnection conA, org.jivesoftware.smack.XMPPConnection conB, org.jivesoftware.smack.util.Async.ThrowingRunnable action) throws Exception
      Perform action and wait until conA observes a presence form conB.

      This method is usually used so that 'action' performs an operation that changes one entities features/nodes/capabilities, and we want to check that another connection is able to observe this change, and use that new "thing" that was added to the connection.

      Note that this method is a workaround at best and not reliable. Because it is not guaranteed that any XEP-0030 related manager, e.g. EntityCapsManager, already processed the presence when this method returns.

      TODO: Come up with a better solution.
      Parameters:
      conA - the connection to observe the presence on.
      conB - the connection sending the presence
      action - the action to perform.
      Throws:
      Exception - in case of an exception.