Search in sources :

Example 66 with SmackIntegrationTest

use of org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest in project Smack by igniterealtime.

the class WaitForClosingStreamElementTest method waitForClosingStreamElementTest.

@SmackIntegrationTest
public void waitForClosingStreamElementTest(AbstractXMPPConnection connection) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
    connection.disconnect();
    Field closingStreamReceivedField = AbstractXMPPConnection.class.getDeclaredField("closingStreamReceived");
    closingStreamReceivedField.setAccessible(true);
    boolean closingStreamReceived = (boolean) closingStreamReceivedField.get(connection);
    assertTrue(closingStreamReceived);
}
Also used : Field(java.lang.reflect.Field) SmackIntegrationTest(org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest)

Aggregations

SmackIntegrationTest (org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest)66 EntityBareJid (org.jxmpp.jid.EntityBareJid)30 AbstractSmackIntegrationTest (org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest)25 XMPPException (org.jivesoftware.smack.XMPPException)23 SmackException (org.jivesoftware.smack.SmackException)20 Resourcepart (org.jxmpp.jid.parts.Resourcepart)20 TestNotPossibleException (org.igniterealtime.smack.inttest.TestNotPossibleException)17 SimpleResultSyncPoint (org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint)17 ResultSyncPoint (org.igniterealtime.smack.inttest.util.ResultSyncPoint)16 EntityFullJid (org.jxmpp.jid.EntityFullJid)12 Message (org.jivesoftware.smack.packet.Message)9 TimeoutException (java.util.concurrent.TimeoutException)8 Presence (org.jivesoftware.smack.packet.Presence)7 SmackIntegrationTestEnvironment (org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment)6 AfterClass (org.igniterealtime.smack.inttest.annotations.AfterClass)6 IntegrationTestRosterUtil (org.igniterealtime.smack.inttest.util.IntegrationTestRosterUtil)6 EntityCapabilitiesChangedListener (org.jivesoftware.smackx.disco.EntityCapabilitiesChangedListener)6 ServiceDiscoveryManager (org.jivesoftware.smackx.disco.ServiceDiscoveryManager)6 PepEventListener (org.jivesoftware.smackx.pep.PepEventListener)6 Assertions (org.junit.jupiter.api.Assertions)6