You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Josh Rosen (JIRA)" <ji...@apache.org> on 2014/12/30 20:55:13 UTC

[jira] [Resolved] (SPARK-4893) Clean up uses of System.setProperty in unit tests

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

Josh Rosen resolved SPARK-4893.
-------------------------------
    Resolution: Duplicate

Resolving this as a duplicate of SPARK-1010.

> Clean up uses of System.setProperty in unit tests
> -------------------------------------------------
>
>                 Key: SPARK-4893
>                 URL: https://issues.apache.org/jira/browse/SPARK-4893
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>            Reporter: Josh Rosen
>            Assignee: Josh Rosen
>
> Several of our tests call {{System.setProperty}} (or test code which implicitly sets system properties) and don't always reset/clear the modified properties, which can create ordering dependencies between tests and cause [hard-to-diagnose failures|https://github.com/apache/spark/pull/3561#issuecomment-67583605].
> I think we can remove most of these System.setProperty calls and replace them by proper usage of SparkConf.
> For the remaining cases where we still need to use System.setProperty, I think that we should use a ScalaTest fixture / mixin to automatically snapshot and restore system properties after test runs.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org