public abstract class AbstractSmackIntegrationTest extends AbstractSmackIntTest
AbstractSmackIntTest.Condition| Modifier and Type | Field and Description |
|---|---|
protected org.jivesoftware.smack.XMPPConnection |
connection
An alias for the first connection
conOne. |
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.
|
INSECURE_RANDOM, LOGGER, sinttestConfiguration, testRunId, timeout| Constructor and Description |
|---|
AbstractSmackIntegrationTest(SmackIntegrationTestEnvironment environment) |
| Modifier and Type | Method and 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.
|
createNewTempFile, getHttpUrlConnectionFor, performActionAndWaitUntilStanzaReceived, waitUntilTrueprotected final org.jivesoftware.smack.XMPPConnection conOne
protected final org.jivesoftware.smack.XMPPConnection conTwo
protected final org.jivesoftware.smack.XMPPConnection conThree
protected final org.jivesoftware.smack.XMPPConnection connection
conOne.protected final java.util.List<org.jivesoftware.smack.XMPPConnection> connections
public AbstractSmackIntegrationTest(SmackIntegrationTestEnvironment environment)
protected void performActionAndWaitForPresence(org.jivesoftware.smack.XMPPConnection conA,
org.jivesoftware.smack.XMPPConnection conB,
org.jivesoftware.smack.util.Async.ThrowingRunnable action)
throws java.lang.Exception
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.conA - the connection to observe the presence on.conB - the connection sending the presenceaction - the action to perform.java.lang.Exception - in case of an exception.