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

    https://github.com/apache/spark/pull/5489#discussion_r28233485
  
    --- Diff: core/src/test/scala/org/apache/spark/rdd/DoubleRDDSuite.scala ---
    @@ -18,10 +18,17 @@
     package org.apache.spark.rdd
     
     import org.scalatest.FunSuite
    +import org.scalatest.Matchers._
     
     import org.apache.spark._
     
     class DoubleRDDSuite extends FunSuite with SharedSparkContext {
    +  test("sum") {
    +    sc.parallelize(Seq.empty[Double]).sum() should be(0.0 +- 0.0001)
    --- End diff --
    
    Experience thought me that exact equality with doubles is unreliable. Now I 
err on the safe side and always use inexact matchers in unit tests.


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