1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 14:02:06 +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:
Gaston Dombiak 2005-04-15 00:51:52 +00:00 committed by gaston
parent d87a0fe615
commit 0f8bb65755

View file

@ -103,6 +103,29 @@ public class MessageTest extends SmackTestCase {
// Check that the second message was received // Check that the second message was received
rcv = (Message) collector.nextResult(1000); rcv = (Message) collector.nextResult(1000);
assertNotNull("No Message was received", rcv); 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() { protected int getMaxConnections() {
@ -110,7 +133,7 @@ public class MessageTest extends SmackTestCase {
} }
protected void setUp() throws Exception { protected void setUp() throws Exception {
XMPPConnection.DEBUG_ENABLED = false; XMPPConnection.DEBUG_ENABLED = true;
super.setUp(); super.setUp();
} }
} }