Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/5559#discussion_r28642064
--- Diff:
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(1)
+ Thread.`yield`()
--- End diff --
What about no wait? I suppose I'm not sure why this depends
deterministically on something like `yield` or `sleep(0)` since it doesn't
necessarily do anything. If the problem is not going fast enough then I'd
expect removing this line goes the fastest of all.
I don't think anyone's arguing against the fix of course; this is about the
test implementation only. In the worst case, `Thread.sleep(0)` with a comment
isn't so bad but I want to fully explore this first.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]