kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject git commit: kafka-1383; transient unit test failure in SocketServerTest; patched by Jun Rao; reviewed by Guozhang Wang and Neha Narkhede
Date Mon, 28 Apr 2014 22:03:28 GMT
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 <junrao@gmail.com>
Authored: Mon Apr 28 15:01:59 2014 -0700
Committer: Jun Rao <junrao@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))
 


Mime
View raw message