Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15623#discussion_r85036750
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/internal/SQLConfSuite.scala ---
    @@ -215,12 +215,18 @@ class SQLConfSuite extends QueryTest with 
SharedSQLContext {
       }
     
       test("default value of WAREHOUSE_PATH") {
    +    def appendTrailingSlashIfNecessary(path: String): String = {
    +      if (!path.endsWith("/")) path + "/" else path
    +    }
    +
         val original = spark.conf.get(SQLConf.WAREHOUSE_PATH)
         try {
           // to get the default value, always unset it
           spark.conf.unset(SQLConf.WAREHOUSE_PATH.key)
    -      assert(new Path(Utils.resolveURI("spark-warehouse")).toString ===
    -        spark.sessionState.conf.warehousePath + "/")
    +      // JVM adds a trailing slash if the directory exists and leaves it 
as-is, if it doesn't
    +      // In our comparison, add trailing slash to both sides if necessary, 
to account for both cases
    +      assert(appendTrailingSlashIfNecessary(new 
Path(Utils.resolveURI("spark-warehouse"))
    --- End diff --
    
    Right forgot that one!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to