Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/8199#discussion_r37124071
--- Diff:
streaming/src/test/scala/org/apache/spark/streaming/scheduler/rate/PIDRateEstimatorSuite.scala
---
@@ -116,13 +133,14 @@ class PIDRateEstimatorSuite extends SparkFunSuite
with Matchers {
}
test("with some accumulated and some positive error, |I| > 0, stay below
the processing speed") {
- val p = new PIDRateEstimator(20, 1D, .01D, 0D)
+ val minRate = 10D
+ val p = new PIDRateEstimator(20, 1D, .01D, 0D, minRate)
val times = List.tabulate(50)(x => x * 20) // every 20ms
val rng = new Random()
- val elements = List.tabulate(50)(x => rng.nextInt(1000))
+ val elements = List.tabulate(50)(x => rng.nextInt(1000) + 1000)
--- End diff --
This test was probably flaky even before the changes in this PR because,
the numElements could randomly be zero, the corresponding `speed` will be 0,
and no matter what the `res` could not less than that speed.
Als the scheduling delay could also randomly be zero (2 lines below), in
which case the `res` would be same as `speed`
---
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]