You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by js...@apache.org on 2019/07/02 02:05:40 UTC

[spark] branch master updated: [SPARK-28202][CORE][TEST] Avoid noises of system props in SparkConfSuite

This is an automated email from the ASF dual-hosted git repository.

jshao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 378ed67  [SPARK-28202][CORE][TEST] Avoid noises of system props in SparkConfSuite
378ed67 is described below

commit 378ed677a865af47a4ab2853df2f71c36a4c378a
Author: ShuMingLi <mi...@gmail.com>
AuthorDate: Tue Jul 2 10:04:42 2019 +0800

    [SPARK-28202][CORE][TEST] Avoid noises of system props in SparkConfSuite
    
    When SPARK_HOME of env is set and contains a specific `spark-defaults,conf`, `org.apache.spark.util.loadDefaultSparkProperties` method may noise `system props`. So when runs `core/test` module, it is possible to fail to run `SparkConfSuite` .
    
     It's easy to repair by setting `loadDefaults` in `SparkConf` to be false.
    
    ```
    [info] - deprecated configs *** FAILED *** (79 milliseconds)
    [info] 7 did not equal 4 (SparkConfSuite.scala:266)
    [info] org.scalatest.exceptions.TestFailedException:
    [info] at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:528)
    [info] at org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:527)
    [info] at org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1560)
    [info] at org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:501)
    [info] at org.apache.spark.SparkConfSuite.$anonfun$new$26(SparkConfSuite.scala:266)
    [info] at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
    [info] at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
    [info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
    [info] at org.scalatest.Transformer.apply(Transformer.scala:22)
    [info] at org.scalatest.Transformer.apply(Transformer.scala:20)
    [info] at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:186)
    [info] at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:149)
    [info] at org.scalatest.FunSuiteLike.invokeWithFixture$1(FunSuiteLike.scala:184)
    [info] at org.scalatest.FunSuiteLike.$anonfun$runTest$1(FunSuiteLike.scala:196)
    [info] at org.scalatest.SuperEngine.runTestImpl(Engine.scala:289)
    ```
    
    Closes #24998 from LiShuMing/SPARK-28202.
    
    Authored-by: ShuMingLi <mi...@gmail.com>
    Signed-off-by: jerryshao <je...@tencent.com>
---
 core/src/test/scala/org/apache/spark/SparkConfSuite.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/test/scala/org/apache/spark/SparkConfSuite.scala b/core/src/test/scala/org/apache/spark/SparkConfSuite.scala
index 74f5854..6be1fed 100644
--- a/core/src/test/scala/org/apache/spark/SparkConfSuite.scala
+++ b/core/src/test/scala/org/apache/spark/SparkConfSuite.scala
@@ -242,7 +242,7 @@ class SparkConfSuite extends SparkFunSuite with LocalSparkContext with ResetSyst
   }
 
   test("deprecated configs") {
-    val conf = new SparkConf()
+    val conf = new SparkConf(false)
     val newName = UPDATE_INTERVAL_S.key
 
     assert(!conf.contains(newName))


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