mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-27 04:57:59 +01:00
Added test for huge messages over an SSL connection.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2484 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
d87a0fe615
commit
0f8bb65755
1 changed files with 24 additions and 1 deletions
|
@ -103,6 +103,29 @@ public class MessageTest extends SmackTestCase {
|
|||
// Check that the second message was received
|
||||
rcv = (Message) collector.nextResult(1000);
|
||||
assertNotNull("No Message was received", rcv);
|
||||
|
||||
// Try now sending huge messages over an SSL connection
|
||||
XMPPConnection conn = null;
|
||||
try {
|
||||
conn = new SSLXMPPConnection(getHost());
|
||||
conn.login(getUsername(0), getUsername(0));
|
||||
|
||||
// Send the first message
|
||||
conn.sendPacket(msg);
|
||||
// Check that the connection that sent the message is still connected
|
||||
assertTrue("Connection was closed", conn.isConnected());
|
||||
// Check that the message was received
|
||||
rcv = (Message) collector.nextResult(1000);
|
||||
assertNotNull("No Message was received", rcv);
|
||||
} catch (XMPPException e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
finally {
|
||||
if (conn != null) {
|
||||
conn.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected int getMaxConnections() {
|
||||
|
@ -110,7 +133,7 @@ public class MessageTest extends SmackTestCase {
|
|||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
XMPPConnection.DEBUG_ENABLED = false;
|
||||
XMPPConnection.DEBUG_ENABLED = true;
|
||||
super.setUp();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue