[
https://issues.apache.org/jira/browse/SPARK-58721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated SPARK-58721:
-----------------------------------
Labels: pull-request-available (was: )
> Add tests for ClientArguments.fromCommandLineArgs
> -------------------------------------------------
>
> Key: SPARK-58721
> URL: https://issues.apache.org/jira/browse/SPARK-58721
> Project: Spark
> Issue Type: Test
> Components: Kubernetes
> Affects Versions: 4.3.0
> Reporter: Rajesh Vakkalagadda
> Priority: Minor
> Labels: pull-request-available
>
> *Summary*
> ClientArguments.fromCommandLineArgs (in KubernetesClientApplication.scala)
> has zero test coverage.
> *Description*
> KubernetesClientApplication.scala defines
> ClientArguments.fromCommandLineArgs, which parses the command-line arguments
> used to launch a Spark driver on Kubernetes: --primary-java-resource,
> --primary-py-file, --primary-r-file, --main-class, --arg (repeatable), and
> --proxy-user. It throws a RuntimeException on any unrecognized argument pair
> and requires --main-class via `require(...)`.
> This is a small, pure function (Array[String] => ClientArguments, no
> SparkConf or KubernetesClient dependency) with no 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, is untested.
> *Proposed tests*
> * Each of the three main-resource flags (--primary-java-resource /
> --primary-py-file / --primary-r-file) sets the correct MainAppResource subtype
> * Default MainAppResource when none of the three flags is given
> * Repeated --arg values are collected in order
> * --proxy-user is parsed
> * Last --main-class wins when specified more than once
> * Missing --main-class throws IllegalArgumentException
> * An unrecognized flag throws RuntimeException
> * A trailing flag with no value throws RuntimeException
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]