[ 
https://issues.apache.org/jira/browse/SPARK-10564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Or updated SPARK-10564:
------------------------------
    Description: 
In ThreadingSuite we have things like:
{code}
  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()
        }
      }
    }
    ...
  }
{code}

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

  was:
In ThreadingSuite we have things like:
{code}
  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()
        }
      }
    }
    ...
  }
{code}

If the asserts in the run block fail, they don't actually fail the test!


> ThreadingSuite: assertions in threads don't fail the test
> ---------------------------------------------------------
>
>                 Key: SPARK-10564
>                 URL: https://issues.apache.org/jira/browse/SPARK-10564
>             Project: Spark
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 1.0.0
>            Reporter: Andrew Or
>            Assignee: Andrew Or
>            Priority: Critical
>
> In ThreadingSuite we have things like:
> {code}
>   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()
>         }
>       }
>     }
>     ...
>   }
> {code}
> If the asserts in the run block fail, they don't actually fail the test! This 
> could mask real bugs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to