You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/15 09:56:56 UTC

[GitHub] [spark] HyukjinKwon opened a new pull request #29759: [SPARK-32481][SQL][TESTS] Skip the test if trash directory cannot be created

HyukjinKwon opened a new pull request #29759:
URL: https://github.com/apache/spark/pull/29759


   ### What changes were proposed in this pull request?
   
   This PR skips the test if trash directory cannot be created. It is possible that the trash directory cannot be created, for example, by permission. And the test fails below:
   
   ```
   - SPARK-32481 Move data to trash on truncate table if enabled *** FAILED *** (154 milliseconds)
     fs.exists(trashPath) was false (DDLSuite.scala:3184)
     org.scalatest.exceptions.TestFailedException:
     at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:530)
     at org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:529)
     at org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1560)
     at org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:503)
   ```
   
   ### Why are the changes needed?
   
   To make the tests pass independently.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, test-only.
   
   ### How was this patch tested?
   
   Manually tested.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] viirya commented on a change in pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29759:
URL: https://github.com/apache/spark/pull/29759#discussion_r488810057



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala
##########
@@ -3118,6 +3118,7 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils {
         val fs = tablePath.getFileSystem(hadoopConf)
         val trashCurrent = new Path(fs.getHomeDirectory, ".Trash/Current")
         val trashPath = Path.mergePaths(trashCurrent, tablePath)
+        assume(fs.mkdirs(trashPath) && fs.delete(trashPath, false))

Review comment:
       Can we show a message when the assume fails?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-693026541


   Merged to master.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-692610486






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-692610244


   cc @Udbhav30 and @dongjoon-hyun 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-692755136






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-693026274


   Let me just merge this since the last change only fixed the messages.
   
   Thanks @dongjoon-hyun and @viirya for reviewing this.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-692609829


   **[Test build #128710 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128710/testReport)** for PR 29759 at commit [`aa545ad`](https://github.com/apache/spark/commit/aa545ad673a6934e5a2470398d13f3ce5239c12c).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] Udbhav30 commented on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
Udbhav30 commented on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-692623576


   Yes seems good to add this condition


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon closed pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #29759:
URL: https://github.com/apache/spark/pull/29759


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-692609829


   **[Test build #128710 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128710/testReport)** for PR 29759 at commit [`aa545ad`](https://github.com/apache/spark/commit/aa545ad673a6934e5a2470398d13f3ce5239c12c).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-692753671


   **[Test build #128710 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128710/testReport)** for PR 29759 at commit [`aa545ad`](https://github.com/apache/spark/commit/aa545ad673a6934e5a2470398d13f3ce5239c12c).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-692755136






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29759: [SPARK-32481][SQL][TESTS][FOLLOW-UP] Skip the test if trash directory cannot be created

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29759:
URL: https://github.com/apache/spark/pull/29759#issuecomment-692610486






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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