Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8199#discussion_r37124163
  
    --- 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 --
    
    I locally tested this by running 100s of times, and its not flaky any more.


---
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]

Reply via email to