Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-10564

ThreadingSuite: assertions in threads don't fail the test

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.0.0
    • 1.5.1, 1.6.0
    • Tests
    • None

    Description

      In ThreadingSuite we have things like:

        test(...) {
          ...
          val threads = (1 to 5).map { i =>
            new Thread() {
              override def run() {
                assert(sc.getLocalProperty("test") === "parent")
                sc.setLocalProperty("test", i.toString)
                assert(sc.getLocalProperty("test") === i.toString)
                sem.release()
              }
            }
          }
          ...
        }
      

      If the asserts in the run block fail, they don't actually fail the test! This could mask real bugs.

      Attachments

        Activity

          People

            andrewor14 Andrew Or
            andrewor14 Andrew Or
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: