GitHub user dongjoon-hyun opened a pull request:

    https://github.com/apache/spark/pull/15291

    [SPARK-17412][CORE] FsHistoryProviderSuite fails if `root` user runs it

    ## What changes were proposed in this pull request?
    
    `FsHistoryProviderSuite` fails if `root` user runs it. The test case 
**SPARK-3697: ignore directories that cannot be read** depends on 
`setReadable(false, false)` to make test data files and expects the number of 
accessible files is 1. But, `root` can access all files, so it returns 2.
    
    **Before**
    ```
    root$ ./build/sbt "project core" "test-only *FsHistoryProviderSuite -- -z 
SPARK-3697"
    ...
    [info] FsHistoryProviderSuite:
    [info] - SPARK-3697: ignore directories that cannot be read. *** FAILED *** 
(1 second, 440 milliseconds)
    [info]   2 was not equal to 1 (FsHistoryProviderSuite.scala:144)
    ```
    
    **After**
    ```
    root$ ./build/sbt "project core" "test-only *FsHistoryProviderSuite -- -z 
SPARK-3697"
    ...
    [info] All tests passed.
    ```
    
    ## How was this patch tested?
    
    This is a test case only patch. Manually, run the following command as 
`root`.
    ```
    ./build/sbt clean package
    ./build/sbt "project core" "test-only *FsHistoryProviderSuite -- -z 
SPARK-3697"
    ```


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-17412

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/15291.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15291
    
----
commit 347917b5e77b85231c3edb83a5d67ad9134eedf0
Author: Dongjoon Hyun <dongj...@apache.org>
Date:   2016-09-28T22:53:03Z

    root can access all files.

----


---
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