Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/21568#discussion_r195921363
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala ---
@@ -250,11 +278,33 @@ class SQLQueryTestSuite extends QueryTest with
SharedSQLContext {
}
private def listTestCases(): Seq[TestCase] = {
- listFilesRecursively(new File(inputFilePath)).map { file =>
- val resultFile = file.getAbsolutePath.replace(inputFilePath,
goldenFilePath) + ".out"
- val absPath = file.getAbsolutePath
- val testCaseName =
absPath.stripPrefix(inputFilePath).stripPrefix(File.separator)
- TestCase(testCaseName, absPath, resultFile)
+ listFilesRecursively(new File(inputFilePath)).flatMap { file =>
+ testCases(file.getAbsolutePath)
+ }
+ }
+
+ private def testCases(inputPath: String): Seq[TestCase] = {
+ val baseResultFileName = inputPath.replace(inputFilePath,
goldenFilePath)
+ val testCaseName =
inputPath.stripPrefix(inputFilePath).stripPrefix(File.separator)
+ testConfigs.get(testCaseName) match {
--- End diff --
Mmmh... Well, actually it is not very silently, as you would see it
executes only once it the test runs and not many times with different suffixes.
But of course it won't fail. @cloud-fan @maropu what do you think?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]