dongjoon-hyun commented on a change in pull request #30472:
URL: https://github.com/apache/spark/pull/30472#discussion_r535759798
##########
File path:
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/SparkConfPropagateSuite.scala
##########
@@ -59,4 +59,42 @@ private[spark] trait SparkConfPropagateSuite { k8sSuite:
KubernetesSuite =>
new File(logConfFilePath).delete()
}
}
+
+ test("Verify large files and unsupported binary/non-utf8 encoded files are
skipped.",
+ k8sTestTag) {
+ val loggingConfigFileName = "log-config-test-log4j.properties"
+ val loggingConfURL: URL =
this.getClass.getClassLoader.getResource(loggingConfigFileName)
+ assert(loggingConfURL != null, "Logging configuration file not available.")
+
+ val content =
Source.createBufferedSource(loggingConfURL.openStream()).getLines().mkString("\n")
+ val sparkConfDirPath = s"${sparkHomeDir.toFile}/conf"
+ val filesToGenerateBinary =
+ Seq("test.jar", "non-utf8.txt", "test.zip", "some-random-binary-file")
+ val binaryContent: Array[Byte] = (1 to 10000).map(_.toByte).toArray
+ val someValidFiles = Seq("config.xml", "log4j.properties", "utf8.txt")
+ try {
+
Review comment:
Shall we remove this empty line?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]