Package org.igniterealtime.smack.inttest
Class AbstractSmackIntegrationTest
- java.lang.Object
-
- org.igniterealtime.smack.inttest.AbstractSmackIntTest
-
- org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
-
- Direct Known Subclasses:
AbstractChatIntegrationTest
,AbstractMultiUserChatIntegrationTest
,AbstractOmemoIntegrationTest
,AbstractOpenPgpIntegrationTest
,ChatStateIntegrationTest
,ChatTest
,EntityCapsTest
,FileTransferIntegrationTest
,FormTest
,GeolocationIntegrationTest
,HttpFileUploadIntegrationTest
,IoTControlIntegrationTest
,IoTDataIntegrationTest
,IoTDiscoveryIntegrationTest
,MamIntegrationTest
,MoodIntegrationTest
,PingIntegrationTest
,PubSubIntegrationTest
,RosterIntegrationTest
,SoftwareInfoIntegrationTest
,UserTuneIntegrationTest
,VersionIntegrationTest
public abstract class AbstractSmackIntegrationTest extends AbstractSmackIntTest
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
AbstractSmackIntTest.Condition
-
-
Field Summary
Fields Modifier and Type Field Description protected org.jivesoftware.smack.XMPPConnection
connection
An alias for the first connectionconOne
.protected java.util.List<org.jivesoftware.smack.XMPPConnection>
connections
protected org.jivesoftware.smack.XMPPConnection
conOne
The first connection.protected org.jivesoftware.smack.XMPPConnection
conThree
The third connection.protected org.jivesoftware.smack.XMPPConnection
conTwo
The second connection.-
Fields inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
INSECURE_RANDOM, LOGGER, sinttestConfiguration, testRunId, timeout
-
-
Constructor Summary
Constructors Constructor Description AbstractSmackIntegrationTest(SmackIntegrationTestEnvironment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
performActionAndWaitForPresence(org.jivesoftware.smack.XMPPConnection conA, org.jivesoftware.smack.XMPPConnection conB, org.jivesoftware.smack.util.Async.ThrowingRunnable action)
Perform action and wait until conA observes a presence form conB.-
Methods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
createNewTempFile, getHttpUrlConnectionFor, performActionAndWaitUntilStanzaReceived, waitUntilTrue
-
-
-
-
Field Detail
-
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 connectionconOne
.
-
connections
protected final java.util.List<org.jivesoftware.smack.XMPPConnection> connections
-
-
Constructor Detail
-
AbstractSmackIntegrationTest
public AbstractSmackIntegrationTest(SmackIntegrationTestEnvironment environment)
-
-
Method Detail
-
performActionAndWaitForPresence
protected void performActionAndWaitForPresence(org.jivesoftware.smack.XMPPConnection conA, org.jivesoftware.smack.XMPPConnection conB, org.jivesoftware.smack.util.Async.ThrowingRunnable action) throws java.lang.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 presenceaction
- the action to perform.- Throws:
java.lang.Exception
- in case of an exception.
-
-