Skip to content

[SPARK-56881][CORE][TESTS] Improve FsHistoryProviderSuite to be more robust#55908

Closed
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-56881
Closed

[SPARK-56881][CORE][TESTS] Improve FsHistoryProviderSuite to be more robust#55908
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-56881

Conversation

@dongjoon-hyun
Copy link
Copy Markdown
Member

@dongjoon-hyun dongjoon-hyun commented May 15, 2026

What changes were proposed in this pull request?

Skip the SPARK-3697: ignore files that cannot be read. test when the file remains readable after setReadable(false, false) (i.e. running as root).

    logFile2.setReadable(false, false)
    assume(!logFile2.canRead, "Test requires the file to be unreadable; " +
      "skipping when running as root.")

Why are the changes needed?

root bypasses POSIX permission checks, so the test's precondition (unreadable file) does not hold and the assertions fail. This mirrors the existing assume(!Utils.isWindows) skip on the line above.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass the CIs.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

@dongjoon-hyun
Copy link
Copy Markdown
Member Author

Thank you, @peter-toth .

dongjoon-hyun added a commit that referenced this pull request May 15, 2026
…e robust

### What changes were proposed in this pull request?

Skip the `SPARK-3697: ignore files that cannot be read.` test when the file remains readable after `setReadable(false, false)` (i.e. running as `root`).

```scala
    logFile2.setReadable(false, false)
    assume(!logFile2.canRead, "Test requires the file to be unreadable; " +
      "skipping when running as root.")
```

### Why are the changes needed?

`root` bypasses POSIX permission checks, so the test's precondition (unreadable file) does not hold and the assertions fail. This mirrors the existing `assume(!Utils.isWindows)` skip on the line above.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

Closes #55908 from dongjoon-hyun/SPARK-56881.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit feba6f9)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun added a commit that referenced this pull request May 15, 2026
…e robust

### What changes were proposed in this pull request?

Skip the `SPARK-3697: ignore files that cannot be read.` test when the file remains readable after `setReadable(false, false)` (i.e. running as `root`).

```scala
    logFile2.setReadable(false, false)
    assume(!logFile2.canRead, "Test requires the file to be unreadable; " +
      "skipping when running as root.")
```

### Why are the changes needed?

`root` bypasses POSIX permission checks, so the test's precondition (unreadable file) does not hold and the assertions fail. This mirrors the existing `assume(!Utils.isWindows)` skip on the line above.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

Closes #55908 from dongjoon-hyun/SPARK-56881.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit feba6f9)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun
Copy link
Copy Markdown
Member Author

dongjoon-hyun commented May 15, 2026

Merged to master/4.x/4.2 for Apache Spark 4.2+ testing.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-56881 branch May 15, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants