Skip to content

[SPARK-56879][CORE][TESTS] Improve JavaUtilsSuite to be more robust#55907

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

[SPARK-56879][CORE][TESTS] Improve JavaUtilsSuite to be more robust#55907
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-56879

Conversation

@dongjoon-hyun
Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Make JavaUtilsSuite.testCreateDirectory scenario 4 skip the IOException assertion when running as root.

Why are the changes needed?

root bypasses filesystem permission checks, so setWritable(false) does not prevent directory creation and the test fails under root (e.g., Docker-based CI).

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 Opus 4.7 (1M context)

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-56879][CORE][TESTS] Improve JavaUtilsSuite to be robust [SPARK-56879][CORE][TESTS] Improve JavaUtilsSuite to be more robust May 15, 2026
@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
### What changes were proposed in this pull request?

Make `JavaUtilsSuite.testCreateDirectory` scenario 4 skip the `IOException` assertion when running as `root`.

### Why are the changes needed?

`root` bypasses filesystem permission checks, so `setWritable(false)` does not prevent directory creation and the test fails under root (e.g., Docker-based CI).

### 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 Opus 4.7 (1M context)

Closes #55907 from dongjoon-hyun/SPARK-56879.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 87ed418)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun added a commit that referenced this pull request May 15, 2026
### What changes were proposed in this pull request?

Make `JavaUtilsSuite.testCreateDirectory` scenario 4 skip the `IOException` assertion when running as `root`.

### Why are the changes needed?

`root` bypasses filesystem permission checks, so `setWritable(false)` does not prevent directory creation and the test fails under root (e.g., Docker-based CI).

### 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 Opus 4.7 (1M context)

Closes #55907 from dongjoon-hyun/SPARK-56879.

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

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

@dongjoon-hyun dongjoon-hyun deleted the SPARK-56879 branch May 15, 2026 21: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