From 3710231c25ca79204124cb8d3ee4705a6d57d4b5 Mon Sep 17 00:00:00 2001 From: Jun Rao Date: Thu, 26 Feb 2015 16:14:33 -0800 Subject: [PATCH] kafka-1400; send a large chunk of bytes to trigger a socket flush --- core/src/test/scala/unit/kafka/network/SocketServerTest.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/test/scala/unit/kafka/network/SocketServerTest.scala b/core/src/test/scala/unit/kafka/network/SocketServerTest.scala index 78b431f..0af23ab 100644 --- a/core/src/test/scala/unit/kafka/network/SocketServerTest.scala +++ b/core/src/test/scala/unit/kafka/network/SocketServerTest.scala @@ -139,8 +139,11 @@ class SocketServerTest extends JUnitSuite { processRequest(server.requestChannel) // then shutdown the server server.shutdown() + + val largeChunkOfBytes = new Array[Byte](1000000) // doing a subsequent send should throw an exception as the connection should be closed. - sendRequest(socket, 0, bytes) + // send a large chunk of bytes to trigger a socket flush + sendRequest(socket, 0, largeChunkOfBytes) } @Test -- 1.8.5.2 (Apple Git-48)