From 70ee3103b5740caf677aac666b154670994e77e5 Mon Sep 17 00:00:00 2001 From: David McGuire Date: Fri, 17 Apr 2015 12:37:12 -0700 Subject: [PATCH] Use Thread.yield(), since Thread.sleep(0) is system-dependent --- .../test/scala/org/apache/spark/streaming/ReceiverSuite.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streaming/src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala b/streaming/src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala index f2dfd834d456c..28a8a9154866a 100644 --- a/streaming/src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala +++ b/streaming/src/test/scala/org/apache/spark/streaming/ReceiverSuite.scala @@ -176,7 +176,7 @@ class ReceiverSuite extends TestSuiteBase with Timeouts with Serializable { blockGenerator.addData(count) generatedData += count count += 1 - Thread.sleep(0) + Thread.`yield`() } blockGenerator.stop()