@@ -59,14 +59,16 @@ class NativeCliRuntimeIT extends FunSpec
5959 private val INPUT_FILE_PATTERN = Pattern .compile(" in[0-9]+\\ .[a-zA-Z]+" )
6060 private val OUTPUT_FILE_PATTERN = Pattern .compile(" out\\ .[a-zA-Z]+" )
6161
62+ private val versionString : String = DataWeaveVersion (ComponentVersion .weaveSuiteVersion).toString()
63+
6264 val testSuites = Seq (
63- TestSuite (" master" , loadTestZipFile(s " weave-suites/runtime- ${ComponentVersion .weaveSuiteVersion}-test.zip " )),
64- TestSuite (" yaml" , loadTestZipFile(s " weave-suites/yaml-module- ${ComponentVersion .weaveSuiteVersion}-test.zip " ))
65- )
65+ TestSuite (" master" , loadTestZipFile(s " weave-suites/runtime- ${ComponentVersion .weaveSuiteVersion}-test.zip " )),
66+ TestSuite (" yaml" , loadTestZipFile(s " weave-suites/yaml-module- ${ComponentVersion .weaveSuiteVersion}-test.zip " ))
67+ )
6668
6769 private def loadTestZipFile (testSuiteExample : String ): File = {
6870 val url = getResource(testSuiteExample)
69- val connection = url.openConnection. asInstanceOf [ FileURLConnection ]
71+ val connection = url.openConnection
7072 val zipFile = new File (connection.getURL.toURI)
7173 zipFile
7274 }
@@ -131,6 +133,7 @@ class NativeCliRuntimeIT extends FunSpec
131133 }
132134 }
133135
136+
134137 def runTestCase (testFolders : Array [File ]): Unit = {
135138 val unsortedScenarios = for {
136139 testFolder <- testFolders
@@ -148,7 +151,7 @@ class NativeCliRuntimeIT extends FunSpec
148151 scenario.inputs.foreach(f => {
149152 val name = FilenameUtils .getBaseName(f.getName)
150153 args = args :+ " -i"
151- args = args :+ (name + s " = ${f.getAbsolutePath}" )
154+ args = args :+ (name + s " = ${f.getAbsolutePath}" )
152155
153156 })
154157
@@ -209,7 +212,7 @@ class NativeCliRuntimeIT extends FunSpec
209212
210213
211214 args = args :+ s " --file= ${cliTransform.getAbsolutePath}"
212- val languageLevel = DataWeaveVersion ( ComponentVersion .weaveSuiteVersion).toString()
215+ val languageLevel = versionString
213216 args = args :+ " --language-level=" + languageLevel
214217
215218 val (exitCode, _, _) = NativeCliITTestRunner (args).execute(TIMEOUT ._1, TIMEOUT ._2)
@@ -398,7 +401,7 @@ class NativeCliRuntimeIT extends FunSpec
398401 Array (" sql_date_mapping" ) ++
399402 Array (" runtime_run" )
400403
401- if (DataWeaveVersion ( ComponentVersion .weaveSuiteVersion).toString() == " 2.4" ) {
404+ val testToIgnore = if (versionString == " 2.4" ) {
402405 baseArray ++
403406 // A change to json streaming in 2.5.0 breaks this test
404407 Array (" default_with_extended_null_type" ) ++
@@ -423,10 +426,16 @@ class NativeCliRuntimeIT extends FunSpec
423426 ) ++
424427 Array (" as-operator" ,
425428 " type-equality"
426- )
427- } else {
429+ ) ++
430+ Array (" xml_doctype" , " stringutils_unwrap" )
431+ } else if (versionString == " 2.5" ) {
432+ baseArray ++
433+ Array (" xml_doctype" , " stringutils_unwrap" )
434+ }
435+ else {
428436 baseArray
429437 }
438+ testToIgnore
430439 }
431440}
432441
0 commit comments