Push enough data through the socket so that the socket close gets detected.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1185210 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2011-10-17 14:33:41 +00:00
parent 6c4bcb3197
commit 970a97ac5f
1 changed files with 23 additions and 22 deletions

View File

@ -105,6 +105,7 @@ public class SoWriteTimeoutTest extends JmsTestSupport {
StompConnection stompConnection = new StompConnection();
stompConnection.open(new Socket("localhost", proxy.getUrl().getPort()));
stompConnection.getStompSocket().setTcpNoDelay(true);
String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
stompConnection.sendFrame(frame);
@ -137,7 +138,7 @@ public class SoWriteTimeoutTest extends JmsTestSupport {
// verify connection is dead
try {
for (int i=0; i<100; i++) {
for (int i=0; i<200; i++) {
stompConnection.send("/queue/" + dest.getPhysicalName(), "ShouldBeDeadConnectionText" + i);
}
fail("expected send to fail with timeout out connection");