You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2014/04/29 00:03:28 UTC
git commit: kafka-1383;
transient unit test failure in SocketServerTest; patched by Jun Rao;
reviewed by Guozhang Wang and Neha Narkhede
Repository: kafka
Updated Branches:
refs/heads/trunk 631536327 -> 2f5666408
kafka-1383; transient unit test failure in SocketServerTest; patched by Jun Rao; reviewed by Guozhang Wang and Neha Narkhede
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/2f566640
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/2f566640
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/2f566640
Branch: refs/heads/trunk
Commit: 2f5666408fa9cf44c59f068f19d654a4b7b52914
Parents: 6315363
Author: Jun Rao <ju...@gmail.com>
Authored: Mon Apr 28 15:01:59 2014 -0700
Committer: Jun Rao <ju...@gmail.com>
Committed: Mon Apr 28 15:01:59 2014 -0700
----------------------------------------------------------------------
core/src/test/scala/unit/kafka/network/SocketServerTest.scala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/2f566640/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/network/SocketServerTest.scala b/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
index 75bd41b..42f6f96 100644
--- a/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
+++ b/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
@@ -114,7 +114,9 @@ class SocketServerTest extends JUnitSuite {
val request = server.requestChannel.receiveRequest
// Since the response is not sent yet, the selection key should not be readable.
- Assert.assertFalse((request.requestKey.asInstanceOf[SelectionKey].interestOps & SelectionKey.OP_READ) == SelectionKey.OP_READ)
+ TestUtils.waitUntilTrue(
+ () => { (request.requestKey.asInstanceOf[SelectionKey].interestOps & SelectionKey.OP_READ) != SelectionKey.OP_READ },
+ "Socket key shouldn't be available for read")
server.requestChannel.sendResponse(new RequestChannel.Response(0, request, null))