Issue #1832 work around

This commit is contained in:
Greg Wilkins 2017-09-26 17:04:42 +10:00
parent c2b7177628
commit e58a7b488e
2 changed files with 14 additions and 14 deletions

View File

@ -357,7 +357,7 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
try (Socket client = newSocket(_serverURI.getHost(), _serverURI.getPort());
StacklessLogging stackless = new StacklessLogging(HttpConnection.class))
{
Log.getLogger(HttpConnection.class).info("expect header is too large, then ISE extra data ...");
Log.getLogger(HttpConnection.class).info("expect header is too large ...");
OutputStream os = client.getOutputStream();
byte[] buffer = new byte[64 * 1024];
@ -379,9 +379,16 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
buffer[15]='H';
buffer[16]=':';
Arrays.fill(buffer,17,buffer.length-1,(byte)'A');
os.write(buffer);
os.flush();
// write the request.
try
{
os.write(buffer);
os.flush();
}
catch(Exception e)
{
// Ignore exceptions during writing, so long as we can read response below
}
// Read the response.
try
@ -391,7 +398,8 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
}
catch(Exception e)
{
// TODO evaluate why we sometimes get an early close on this test
Log.getLogger(HttpServerTestBase.class).warn("TODO Early close???");
// TODO #1832 evaluate why we sometimes get an early close on this test
}
}
}

View File

@ -119,14 +119,7 @@ public class SelectChannelServerSslTest extends HttpServerTestBase
@Override
public void testFullHeader() throws Exception
{
try
{
super.testFullHeader();
}
catch (SocketException|SSLException e)
{
Log.getLogger(SslConnection.class).warn("Close overtook 400 response");
}
super.testFullHeader();
}
@Before
@ -168,7 +161,6 @@ public class SelectChannelServerSslTest extends HttpServerTestBase
}
catch(Exception e)
{
e.printStackTrace();
throw new RuntimeException(e);
}
}