Skip to content

[SPARK-58721][K8S] Add tests for ClientArguments.fromCommandLineArgs - #57944

Open
vrjdev wants to merge 1 commit into
apache:masterfrom
vrjdev:k8s-clientarguments-test
Open

[SPARK-58721][K8S] Add tests for ClientArguments.fromCommandLineArgs#57944
vrjdev wants to merge 1 commit into
apache:masterfrom
vrjdev:k8s-clientarguments-test

Conversation

@vrjdev

@vrjdev vrjdev commented Aug 12, 2026

Copy link
Copy Markdown

What changes were proposed in this pull request?

Adds unit tests for ClientArguments.fromCommandLineArgs in KubernetesClientApplication.scala, covering all supported command-line flags and its error paths.

Why are the changes needed?

This is a small, pure function with zero direct test coverage. The sibling Client class in the same file is thoroughly tested via ClientSuite.scala, but ClientArguments' own parsing logic - including its error paths (missing --main-class, an unrecognized flag, a trailing flag with no value) - was untested.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

New unit tests in ClientArgumentsSuite.scala, run locally via build/sbt -Pkubernetes 'kubernetes/testOnly *ClientArgumentsSuite' - all 11 tests pass.

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

Generated-by: Claude Sonnet 5

ClientArguments.fromCommandLineArgs (in KubernetesClientApplication.scala)
had zero test coverage. This adds unit tests covering all supported flags
(--primary-java-resource, --primary-py-file, --primary-r-file, --main-class,
--arg, --proxy-user) and its error paths (missing --main-class, an
unrecognized flag, and a trailing flag with no value).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vrjdev
vrjdev force-pushed the k8s-clientarguments-test branch from 795bf81 to 0c50a71 Compare August 12, 2026 01:43
@uros-b

uros-b commented Aug 12, 2026

Copy link
Copy Markdown
Member

Thank you @vrjdev!

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