Skip to content

Commit 117452a

Browse files
committed
[SPARK-50605][CONNECT][TESTS][FOLLOW-UP] Remove unused YarnConnectTest
### What changes were proposed in this pull request? This PR is a followup of #49107 that removes the unused `YarnConnectTest`. ### Why are the changes needed? It was mistakenly added, and forgotten to be removed. ### Does this PR introduce _any_ user-facing change? No, test-only. ### How was this patch tested? CI in this PR should verify the change. ### Was this patch authored or co-authored using generative AI tooling? No Closes #50762 from HyukjinKwon/SPARK-50605-followup. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]> (cherry picked from commit 1fe7f63) Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent e2051ea commit 117452a

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -767,34 +767,6 @@ private object YarnClasspathTest extends Logging {
767767

768768
}
769769

770-
private object YarnConnectTest extends Logging {
771-
def main(args: Array[String]): Unit = {
772-
val output = new java.io.PrintStream(new File(args(0)))
773-
val clz = Utils.classForName("org.apache.spark.sql.SparkSession$")
774-
val moduleField = clz.getDeclaredField("MODULE$")
775-
val obj = moduleField.get(null)
776-
var builder = clz.getMethod("builder").invoke(obj)
777-
builder = builder.getClass().getMethod(
778-
"config", classOf[String], classOf[String]).invoke(builder, SPARK_API_MODE.key, "connect")
779-
builder = builder.getClass().getMethod("master", classOf[String]).invoke(builder, "yarn")
780-
val session = builder.getClass().getMethod("getOrCreate").invoke(builder)
781-
782-
try {
783-
// Check if the current session is a Spark Connect session.
784-
session.getClass().getDeclaredField("client")
785-
val df = session.getClass().getMethod("range", classOf[Long]).invoke(session, 10)
786-
assert(df.getClass().getMethod("count").invoke(df) == 10)
787-
} catch {
788-
case e: Throwable =>
789-
e.printStackTrace(new java.io.PrintStream(output))
790-
throw e
791-
} finally {
792-
session.getClass().getMethod("stop").invoke(session)
793-
output.close()
794-
}
795-
}
796-
}
797-
798770
private object YarnAddJarTest extends Logging {
799771
def main(args: Array[String]): Unit = {
800772
if (args.length != 3) {

0 commit comments

Comments
 (0)