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

ThreadingSuite: assertions in threads don't fail the test

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.5.1, 1.6.0
    • Component/s: Tests
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: