diff --git a/build.sbt b/build.sbt index e5e254a65..1b92e3903 100644 --- a/build.sbt +++ b/build.sbt @@ -98,10 +98,10 @@ lazy val sources = (project in file("sources")) testSettings, libraryDependencies ++= Seq( apacheHttpClient, - springCore, jwtApi, jwtImpl, jwtCore, + springCore, dropboxSDK, aws, postgresqlDeps, @@ -151,8 +151,7 @@ lazy val snapiFrontend = (project in file("snapi-frontend")) kiama, commonsCodec, kryo - ) ++ - poiDeps + ) ) val calculateClasspath = taskKey[Seq[File]]("Calculate the full classpath") @@ -179,7 +178,7 @@ lazy val snapiTruffle = (project in file("snapi-truffle")) commonSettings, snapiTruffleCompileSettings, testSettings, - libraryDependencies ++= truffleCompiler ++ scalaCompiler, + libraryDependencies ++= truffleCompiler, calculateClasspath := { val dependencyFiles = (Compile / dependencyClasspath).value.files val unmanagedFiles = (Compile / unmanagedClasspath).value.files diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 442c3cd8a..43c8d5a7f 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -36,8 +36,7 @@ object Dependencies { "com.fasterxml.jackson.dataformat" % "jackson-dataformat-cbor" % "2.15.2", "com.fasterxml.jackson.dataformat" % "jackson-dataformat-csv" % "2.15.2", "com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % "2.15.2", - "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.15.2-rawlabs", - "com.fasterxml.jackson.jakarta.rs" % "jackson-jakarta-rs-json-provider" % "2.15.2" + "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.15.2-rawlabs" ) // Required while we are on Scala 2.12. It's built into Scala 2.13. @@ -53,9 +52,7 @@ object Dependencies { // from snapi-frontend val kiama = "org.bitbucket.inkytonik.kiama" %% "kiama" % "2.5.1-rawlabs" - - val aws = - "software.amazon.awssdk" % "s3" % "2.20.69" exclude ("commons-logging", "commons-logging") // spring.jcl is the correct replacement for this one. + val aws = "software.amazon.awssdk" % "s3" % "2.20.69" exclude ("commons-logging", "commons-logging") // we use slf4j val woodstox = "com.fasterxml.woodstox" % "woodstox-core" % "6.5.1" val kryo = "com.esotericsoftware" % "kryo" % "5.5.0" val commonsLang = "org.apache.commons" % "commons-lang3" % "3.13.0" @@ -68,27 +65,18 @@ object Dependencies { val oracleDeps = "com.oracle.database.jdbc" % "ojdbc10" % "19.23.0.0-rawlabs" val teradataDeps = "com.teradata.jdbc" % "terajdbc" % "20.00.00.24" val icuDeps = "com.ibm.icu" % "icu4j" % "73.2" - val poiDeps = Seq( - "org.apache.poi" % "poi" % "5.2.3", - "org.apache.poi" % "poi-ooxml" % "5.2.3", - "org.apache.poi" % "poi-ooxml-lite" % "5.2.3" - ) val jwtApi = "io.jsonwebtoken" % "jjwt-api" % "0.11.5" val jwtImpl = "io.jsonwebtoken" % "jjwt-impl" % "0.11.5" val jwtCore = "com.github.jwt-scala" %% "jwt-core" % "9.4.4-rawlabs" - val springCore = "org.springframework" % "spring-core" % "5.3.13" + val springCore = + "org.springframework" % "spring-core" % "5.3.13" exclude ("org.springframework", "spring-jcl") // we use jcl-over-slf4j val truffleCompiler = Seq( - "org.graalvm.truffle" % "truffle-api" % "23.1.0", "org.graalvm.truffle" % "truffle-api" % "23.1.0", "org.graalvm.truffle" % "truffle-compiler" % "23.1.0", "org.graalvm.truffle" % "truffle-nfi" % "23.1.0", "org.graalvm.truffle" % "truffle-nfi-libffi" % "23.1.0", "org.graalvm.truffle" % "truffle-runtime" % "23.1.0" ) - val scalaCompiler = Seq( - "org.scala-lang" % "scala-compiler" % "2.12.18", - "org.scala-lang" % "scala-reflect" % "2.12.18" - ) // from sql-client val hikariCP = "com.zaxxer" % "HikariCP" % "5.1.0" diff --git a/snapi-client/src/main/java/module-info.java b/snapi-client/src/main/java/module-info.java index 82d6f5626..2d0086b21 100644 --- a/snapi-client/src/main/java/module-info.java +++ b/snapi-client/src/main/java/module-info.java @@ -21,6 +21,8 @@ requires raw.client; requires raw.snapi.frontend; + uses raw.client.api.CompilerServiceBuilder; + provides raw.client.api.CompilerServiceBuilder with raw.client.rql2.truffle.Rql2TruffleCompilerServiceBuilder; } diff --git a/snapi-client/src/main/resources/reference.conf b/snapi-client/src/main/resources/reference.conf deleted file mode 100644 index c8b6d3f31..000000000 --- a/snapi-client/src/main/resources/reference.conf +++ /dev/null @@ -1,2 +0,0 @@ -// Default to local credentials service. -raw.creds.impl = "local" \ No newline at end of file diff --git a/snapi-client/src/main/scala/raw/client/rql2/truffle/CustomClassAndModuleLoader.scala b/snapi-client/src/main/scala/raw/client/rql2/truffle/CustomClassAndModuleLoader.scala new file mode 100644 index 000000000..170adcff1 --- /dev/null +++ b/snapi-client/src/main/scala/raw/client/rql2/truffle/CustomClassAndModuleLoader.scala @@ -0,0 +1,84 @@ +/* + * Copyright 2024 RAW Labs S.A. + * + * Use of this software is governed by the Business Source License + * included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with + * the Business Source License, use of this software will be governed + * by the Apache License, Version 2.0, included in the file + * licenses/APL.txt. + */ + +package raw.client.rql2.truffle + +import com.typesafe.scalalogging.StrictLogging + +import java.lang.module.ModuleFinder +import java.nio.file.Paths +import scala.collection.JavaConverters._ + +/** + * Create a custom class and module loader for the given module path. + * This used to completely isolate the Truffle runtime from the rest of the system. + */ +trait CustomClassAndModuleLoader extends StrictLogging { + + /** + * Create a custom class and module loader for the given module path. + * This is fully isolated, including only the system packages and whatever JARs are in the module path passed + * as an argument. + * + * @param modulePath the path to the module + * @return a class loader that contains only the system packages and the modules in the module path + */ + def createCustomClassAndModuleLoader(modulePath: String): ClassLoader = { + + // Create a custom module finder for the module path + val modulePathFinder = ModuleFinder.of(Paths.get(modulePath)) + + // Get all modules in the module path + val modulesFromModulePathFinder = modulePathFinder + .findAll() + .toArray + .map(_.asInstanceOf[java.lang.module.ModuleReference].descriptor().name()) + .toSet + + modulesFromModulePathFinder.foreach(f => logger.trace(s"JAR path module: $f")) + + // Get the parent layer + val parentLayer = ModuleLayer.boot() + + // Get all modules in the system module finder + val systemModuleFinder = ModuleFinder.ofSystem() + val systemModules = parentLayer.configuration().modules().asScala.map(_.reference().descriptor().name()).toSet + + systemModules.foreach(f => logger.trace(s"System module: $f")) + + // Combine all modules + val allModules = modulesFromModulePathFinder ++ systemModules + + // Creating a configuration, starting from the parent layer, and resolving all modules. + // The parent layer is the boot layer, so it contains all the system modules. + val configuration = parentLayer + .configuration() + .resolveAndBind( + modulePathFinder, + systemModuleFinder, + allModules.asJava + ) + + // Get the root classloader, which is the platform classloader + val rootClassLoader = ClassLoader.getPlatformClassLoader + + // Create a module layer with the custom configuration, using the parent layer and the root classloader + val controller = ModuleLayer.defineModulesWithOneLoader(configuration, List(parentLayer).asJava, rootClassLoader) + val customLayer = controller.layer() + + // Because we used ModuleLayer.defineModulesWithOneLoader, all the modules share the same classloader. + // So we find the first module (whatever that is), get its classloader, and that's the classloader for all of them. + val moduleName = customLayer.modules().iterator().next().getName + customLayer.findLoader(moduleName) + } + +} diff --git a/snapi-client/src/main/scala/raw/client/rql2/truffle/Rql2TruffleCompilerService.scala b/snapi-client/src/main/scala/raw/client/rql2/truffle/Rql2TruffleCompilerService.scala index 13adb38ea..6cd9ac76b 100644 --- a/snapi-client/src/main/scala/raw/client/rql2/truffle/Rql2TruffleCompilerService.scala +++ b/snapi-client/src/main/scala/raw/client/rql2/truffle/Rql2TruffleCompilerService.scala @@ -39,14 +39,27 @@ import scala.collection.mutable import scala.util.control.NonFatal object Rql2TruffleCompilerService { - val language: Set[String] = Set("rql2", "rql2-truffle", "snapi") + val LANGUAGE: Set[String] = Set("rql2", "rql2-truffle", "snapi") + + val JARS_PATH = "raw.client.rql2.jars-path" } class Rql2TruffleCompilerService(engineDefinition: (Engine, Boolean), maybeClassLoader: Option[ClassLoader])( implicit protected val settings: RawSettings ) extends Rql2CompilerService + with CustomClassAndModuleLoader with Rql2TypeUtils { + private val originalClassLoader = maybeClassLoader.getOrElse(Thread.currentThread().getContextClassLoader) + + private val maybeTruffleClassLoader: Option[ClassLoader] = { + // If defined, contains the path used to create a classloader for the Truffle language runtime. + val maybeJarsPath = settings.getStringOpt(Rql2TruffleCompilerService.JARS_PATH) + + // If the jars path is defined, create a custom class loader. + maybeJarsPath.map(jarsPath => createCustomClassAndModuleLoader(jarsPath)) + } + private val (engine, initedEngine) = engineDefinition // The default constructor allows an Engine to be specified, plus a flag to indicate whether it was created here @@ -60,9 +73,9 @@ class Rql2TruffleCompilerService(engineDefinition: (Engine, Boolean), maybeClass this(CompilerService.getEngine, maybeClassLoader) } - override def language: Set[String] = Rql2TruffleCompilerService.language + override def language: Set[String] = Rql2TruffleCompilerService.LANGUAGE - private val credentials = CredentialsServiceProvider(maybeClassLoader) + private val credentials = CredentialsServiceProvider() // Map of users to compiler context. private val compilerContextCaches = new mutable.HashMap[AuthenticatedUser, CompilerContext] @@ -76,13 +89,13 @@ class Rql2TruffleCompilerService(engineDefinition: (Engine, Boolean), maybeClass private def createCompilerContext(user: AuthenticatedUser, language: String): CompilerContext = { // Initialize source context - implicit val sourceContext = new SourceContext(user, credentials, settings, maybeClassLoader) + implicit val sourceContext = new SourceContext(user, credentials, settings, Some(originalClassLoader)) // Initialize inferrer - val inferrer = InferrerServiceProvider(maybeClassLoader) + val inferrer = InferrerServiceProvider() // Initialize compiler context - new CompilerContext(language, user, inferrer, sourceContext, maybeClassLoader) + new CompilerContext(language, user, inferrer, sourceContext, Some(originalClassLoader)) } private def getProgramContext(user: AuthenticatedUser, environment: ProgramEnvironment): ProgramContext = { @@ -701,6 +714,14 @@ class Rql2TruffleCompilerService(engineDefinition: (Engine, Boolean), maybeClass environment.options.get("staged-compiler").foreach { stagedCompiler => ctxBuilder.option("rql.staged-compiler", stagedCompiler) } + ctxBuilder.option("rql.settings", settings.renderAsString) + // If the jars path is defined, create a custom class loader and set it as the host class loader. + maybeTruffleClassLoader.map { classLoader => + // Set the module class loader as the Truffle runtime classloader. + // This enables the Truffle language runtime to be fully isolated from the rest of the application. + ctxBuilder.hostClassLoader(classLoader) + } + maybeOutputStream.foreach(os => ctxBuilder.out(os)) val ctx = ctxBuilder.build() ctx diff --git a/snapi-client/src/main/scala/raw/client/rql2/truffle/Rql2TruffleCompilerServiceBuilder.scala b/snapi-client/src/main/scala/raw/client/rql2/truffle/Rql2TruffleCompilerServiceBuilder.scala index 9d06949fd..1f5cf3f6e 100644 --- a/snapi-client/src/main/scala/raw/client/rql2/truffle/Rql2TruffleCompilerServiceBuilder.scala +++ b/snapi-client/src/main/scala/raw/client/rql2/truffle/Rql2TruffleCompilerServiceBuilder.scala @@ -16,7 +16,7 @@ import raw.client.api.{CompilerService, CompilerServiceBuilder} import raw.utils.RawSettings class Rql2TruffleCompilerServiceBuilder extends CompilerServiceBuilder { - override def language: Set[String] = Rql2TruffleCompilerService.language + override def language: Set[String] = Rql2TruffleCompilerService.LANGUAGE override def build(maybeClassLoader: Option[ClassLoader])(implicit settings: RawSettings): CompilerService = { new Rql2TruffleCompilerService(maybeClassLoader) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/CompilerTestContext.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/Rql2CompilerTestContext.scala similarity index 99% rename from snapi-client/src/test/scala/raw/compiler/rql2/tests/CompilerTestContext.scala rename to snapi-client/src/test/scala/raw/compiler/rql2/tests/Rql2CompilerTestContext.scala index 5aacdf6fd..c2d3a5ecb 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/CompilerTestContext.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/Rql2CompilerTestContext.scala @@ -19,7 +19,7 @@ import org.scalatest.matchers.{MatchResult, Matcher} import raw.client.api._ import raw.client.rql2.api._ import raw.compiler.base.source.{BaseProgram, Type} -import raw.compiler.rql2.api.Rql2CompilerServiceTestContext +import raw.compiler.rql2.api.{Rql2CompilerServiceTestContext, Rql2OutputTestContext} import raw.inferrer.local.LocalInferrerTestContext import raw.utils._ @@ -29,12 +29,13 @@ import java.nio.file.{Files, Path, StandardOpenOption} import scala.collection.mutable import scala.io.Source -trait CompilerTestContext +trait Rql2CompilerTestContext extends RawTestSuite with Matchers with SettingsTestContext with TrainingWheelsContext with Rql2CompilerServiceTestContext + with Rql2OutputTestContext // Simple inferrer with LocalInferrerTestContext { diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/benchmark/BenchmarkTests.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/benchmark/BenchmarkTests.scala index 304bb49c2..a4cf61189 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/benchmark/BenchmarkTests.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/benchmark/BenchmarkTests.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.benchmark -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BenchmarkTests extends CompilerTestContext { +trait BenchmarkTests extends Rql2CompilerTestContext { property("raw.training-wheels", "false") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/benchmark/StressTests.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/benchmark/StressTests.scala index f450e97ee..cfd25ebe7 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/benchmark/StressTests.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/benchmark/StressTests.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.benchmark -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait StressTests extends CompilerTestContext { +trait StressTests extends Rql2CompilerTestContext { val shouldBeExecuted = false diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/BinaryPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/BinaryPackageTest.scala index 730d4b698..a5d5a86a8 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/BinaryPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/BinaryPackageTest.scala @@ -13,12 +13,12 @@ package raw.compiler.rql2.tests.builtin import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import java.nio.file.Path import java.util.Base64 -trait BinaryPackageTest extends CompilerTestContext { +trait BinaryPackageTest extends Rql2CompilerTestContext { // FIXME (msb): This should use cast to support string to binary and do .getBytes("utf-8") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/BytePackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/BytePackageTest.scala index 33781b2a1..5275b2d86 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/BytePackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/BytePackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BytePackageTest extends CompilerTestContext { +trait BytePackageTest extends Rql2CompilerTestContext { test(""" Byte.From(1)""")(it => it should evaluateTo("1b")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/CsvPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/CsvPackageTest.scala index a65f9c935..dd1d51923 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/CsvPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/CsvPackageTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.builtin import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait CsvPackageTest extends CompilerTestContext { +trait CsvPackageTest extends Rql2CompilerTestContext { val ttt = "\"\"\"" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DatePackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DatePackageTest.scala index 543310b11..942049d2d 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DatePackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DatePackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait DatePackageTest extends CompilerTestContext { +trait DatePackageTest extends Rql2CompilerTestContext { test("Date.Build(2022, 1, 15)") { it => it should typeAs("date") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DecimalPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DecimalPackageTest.scala index 965a08808..337ab7504 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DecimalPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DecimalPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait DecimalPackageTest extends CompilerTestContext { +trait DecimalPackageTest extends Rql2CompilerTestContext { test("""Decimal.Round(Decimal.From("1.423"), 2)""") { it => it should evaluateTo("""1.42q""") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DoublePackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DoublePackageTest.scala index 32db740f8..5cef07731 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DoublePackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/DoublePackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait DoublePackageTest extends CompilerTestContext { +trait DoublePackageTest extends Rql2CompilerTestContext { test(""" Double.From(1)""")(it => it should evaluateTo("1.0")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/EnvironmentPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/EnvironmentPackageTest.scala index d89e78228..33c252a6b 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/EnvironmentPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/EnvironmentPackageTest.scala @@ -13,11 +13,11 @@ package raw.compiler.rql2.tests.builtin import com.google.common.collect.HashMultiset -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import scala.collection.JavaConverters._ -trait EnvironmentPackageTest extends CompilerTestContext { +trait EnvironmentPackageTest extends Rql2CompilerTestContext { test("""Environment.Secret("my-typo")""")(it => it should runErrorAs("could not find secret my-typo")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/ErrorPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/ErrorPackageTest.scala index 3697b953b..f28950b53 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/ErrorPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/ErrorPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ErrorPackageTest extends CompilerTestContext { +trait ErrorPackageTest extends Rql2CompilerTestContext { test(""" Error.Build("an error")""")(it => it should runErrorAs("an error")) test(""" Error.Build("an error") == Error.Build("an error")""")(it => it should runErrorAs("an error")) test(""" Error.Build("an error") == Error.Build("another error")""")(it => it should runErrorAs("an error")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/FloatPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/FloatPackageTest.scala index 3d4499c35..fc2b54273 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/FloatPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/FloatPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait FloatPackageTest extends CompilerTestContext { +trait FloatPackageTest extends Rql2CompilerTestContext { test(""" Float.From(1)""")(it => it should evaluateTo("1.0f")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/FunctionPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/FunctionPackageTest.scala index f28083508..b0404de7d 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/FunctionPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/FunctionPackageTest.scala @@ -13,10 +13,10 @@ package raw.compiler.rql2.tests.builtin import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.bytestream.api.HttpLocationsTestContext -trait FunctionPackageTest extends CompilerTestContext with HttpLocationsTestContext { +trait FunctionPackageTest extends Rql2CompilerTestContext with HttpLocationsTestContext { test("""Function.InvokeAfter(() -> 1 +1, 10)""".stripMargin)(_ should evaluateTo("2")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/HttpPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/HttpPackageTest.scala index 6c1f3895a..ddd3a1108 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/HttpPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/HttpPackageTest.scala @@ -15,12 +15,12 @@ import com.sun.net.httpserver.{BasicAuthenticator, HttpExchange, HttpServer} import com.typesafe.scalalogging.StrictLogging import org.scalatest.BeforeAndAfterAll import raw.creds.dropbox.DropboxTestCreds -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import java.net.InetSocketAddress import scala.collection.JavaConverters._ -trait HttpPackageTest extends CompilerTestContext with DropboxTestCreds with BeforeAndAfterAll { +trait HttpPackageTest extends Rql2CompilerTestContext with DropboxTestCreds with BeforeAndAfterAll { val expectedUser = "user" val expectedPassword = "passwd" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/IntPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/IntPackageTest.scala index 6a73d9051..0abf153e0 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/IntPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/IntPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait IntPackageTest extends CompilerTestContext { +trait IntPackageTest extends Rql2CompilerTestContext { test(""" Int.From(1)""")(it => it should evaluateTo("1")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/IntervalPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/IntervalPackageTest.scala index af8fb1772..746a30605 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/IntervalPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/IntervalPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait IntervalPackageTest extends CompilerTestContext { +trait IntervalPackageTest extends Rql2CompilerTestContext { test("Interval.Build(months=12) == Interval.Build(years=1)")(_ should evaluateTo("true")) test("Interval.Build(hours=24) == Interval.Build(days=1)")(_ should evaluateTo("true")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/JsonPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/JsonPackageTest.scala index c46f62ac2..08e195842 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/JsonPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/JsonPackageTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.builtin import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait JsonPackageTest extends CompilerTestContext { +trait JsonPackageTest extends Rql2CompilerTestContext { private val junkAfter10Items = tempFile("""[ | {"a": 1, "b": "#1", "c": 1.1}, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/LocationPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/LocationPackageTest.scala index 672f79aa4..c9fd33cc4 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/LocationPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/LocationPackageTest.scala @@ -13,12 +13,12 @@ package raw.compiler.rql2.tests.builtin import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext import java.nio.file.Path -trait LocationPackageTest extends CompilerTestContext with LocalLocationsTestContext { +trait LocationPackageTest extends Rql2CompilerTestContext with LocalLocationsTestContext { test(s""" |let diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/LongPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/LongPackageTest.scala index 7173873db..1dace17f7 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/LongPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/LongPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LongPackageTest extends CompilerTestContext { +trait LongPackageTest extends Rql2CompilerTestContext { test(""" Long.From(1)""")(it => it should evaluateTo("1L")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/MathPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/MathPackageTest.scala index e4d0f44cc..36f5d18df 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/MathPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/MathPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait MathPackageTest extends CompilerTestContext { +trait MathPackageTest extends Rql2CompilerTestContext { // Nullable - Tryable tests test("""Math.Sin(if(true) then 3.13 else null)""")(_ should beCloseTo("0.011592393936158275")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/NullablePackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/NullablePackageTest.scala index 8dc3f9156..78930ad1c 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/NullablePackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/NullablePackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait NullablePackageTest extends CompilerTestContext { +trait NullablePackageTest extends Rql2CompilerTestContext { test("""Nullable.IsNull(null)""")(_ should evaluateTo("true")) test("""Nullable.IsNull(1)""")(_ should evaluateTo("false")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/NullableTryablePackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/NullableTryablePackageTest.scala index 1dccef2d7..20073725b 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/NullableTryablePackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/NullableTryablePackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait NullableTryablePackageTest extends CompilerTestContext { +trait NullableTryablePackageTest extends Rql2CompilerTestContext { test("""1 / null""")(_ should evaluateTo("null")) test(""" 1.0 / (if true then null else 2)""")(_ should evaluateTo("null")) test(""" 1.0 / (if false then null else 2)""")(_ should evaluateTo("0.5")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/RecordPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/RecordPackageTest.scala index 4d1f9f495..6222d0400 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/RecordPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/RecordPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RecordPackageTest extends CompilerTestContext { +trait RecordPackageTest extends Rql2CompilerTestContext { test("""Record.Build(a = 1, b = "Hello")""".stripMargin)(_ should (typeAs("record(a: int, b: string)") and run)) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/RegexPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/RegexPackageTest.scala index b04840202..444528acf 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/RegexPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/RegexPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RegexPackageTest extends CompilerTestContext { +trait RegexPackageTest extends Rql2CompilerTestContext { test("""Regex.Replace("Heelloo John", "[aeiou]+", "_")""")(it => it should evaluateTo(""" "H_ll_ J_hn" """)) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/S3PackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/S3PackageTest.scala index 487f22c75..cdae600d1 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/S3PackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/S3PackageTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.builtin import raw.creds.s3.S3TestCreds -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait S3PackageTest extends CompilerTestContext with S3TestCreds { +trait S3PackageTest extends Rql2CompilerTestContext with S3TestCreds { // reading a public s3 bucket without registering or passing credentials test(s"""let diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/ShortPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/ShortPackageTest.scala index 7dd027dfb..dc95b0758 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/ShortPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/ShortPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ShortPackageTest extends CompilerTestContext { +trait ShortPackageTest extends Rql2CompilerTestContext { test(""" Short.From(1)""")(it => it should evaluateTo("1s")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/StringPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/StringPackageTest.scala index d9f9db762..a058bd40f 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/StringPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/StringPackageTest.scala @@ -14,11 +14,11 @@ package raw.compiler.rql2.tests.builtin import java.util.Base64 import raw.compiler.utils._ -import raw.compiler.rql2.tests.{CompilerTestContext, FailAfterNServer} +import raw.compiler.rql2.tests.{FailAfterNServer, Rql2CompilerTestContext} import java.nio.file.Path -trait StringPackageTest extends CompilerTestContext with FailAfterNServer { +trait StringPackageTest extends Rql2CompilerTestContext with FailAfterNServer { // Each line has 11 bytes so it will fail at line 10 more or less. override def failServices: Seq[FailAfter] = Seq( diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/SuccessPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/SuccessPackageTest.scala index 43464cd90..b974f781c 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/SuccessPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/SuccessPackageTest.scala @@ -14,9 +14,9 @@ package raw.compiler.rql2.tests.builtin import org.scalatest.prop.TableDrivenPropertyChecks import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait SuccessPackageTest extends CompilerTestContext with TableDrivenPropertyChecks { +trait SuccessPackageTest extends Rql2CompilerTestContext with TableDrivenPropertyChecks { test("Success.Build(1)")(_ should evaluateTo("1")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TimePackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TimePackageTest.scala index e2304a988..3b5fdedb1 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TimePackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TimePackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait TimePackageTest extends CompilerTestContext { +trait TimePackageTest extends Rql2CompilerTestContext { test("Time.Build(9, 30)") { it => it should typeAs("time") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TimestampPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TimestampPackageTest.scala index e7870a321..9ece622ee 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TimestampPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TimestampPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait TimestampPackageTest extends CompilerTestContext { +trait TimestampPackageTest extends Rql2CompilerTestContext { test("Timestamp.Build(2022, 1, 15, 9, 30)") { it => it should typeAs("timestamp") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TryPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TryPackageTest.scala index ef340d992..027638cfa 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TryPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TryPackageTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait TryPackageTest extends CompilerTestContext { +trait TryPackageTest extends Rql2CompilerTestContext { test("""Try.IsError("hi")""")(_ should evaluateTo("false")) test("""Try.IsError(1)""")(_ should evaluateTo("false")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TypePackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TypePackageTest.scala index 6f114dee0..9ca79b867 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TypePackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/TypePackageTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.builtin import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait TypePackageTest extends CompilerTestContext { +trait TypePackageTest extends Rql2CompilerTestContext { ignore("""Types.Merge(int, float)""")(it => it should typeAs("float")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/XmlPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/XmlPackageTest.scala index a415ddc4f..53502b548 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/XmlPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/XmlPackageTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.builtin import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait XmlPackageTest extends CompilerTestContext { +trait XmlPackageTest extends Rql2CompilerTestContext { private val allTypes = tempFile(""" | 120 diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionDistinctTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionDistinctTest.scala index a8501bd5b..6348f1a3f 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionDistinctTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionDistinctTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.builtin.collection import raw.compiler.rql2.errors.ItemsNotComparable -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait CollectionDistinctTest extends CompilerTestContext { +trait CollectionDistinctTest extends Rql2CompilerTestContext { test("""let numbers = Collection.From([5, 2, 4, 2, 2, 4, 5]) |in Collection.Distinct(numbers)""".stripMargin)(_ should evaluateTo("[2, 4, 5]")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionExplodeTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionExplodeTest.scala index 43b3ee420..b92212f92 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionExplodeTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionExplodeTest.scala @@ -13,10 +13,10 @@ package raw.compiler.rql2.tests.builtin.collection import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait CollectionExplodeTest extends CompilerTestContext with LocalLocationsTestContext { +trait CollectionExplodeTest extends Rql2CompilerTestContext with LocalLocationsTestContext { private val nba = tempFile("""[ | {"team": {"name": "Bulls", "city": "Chicago"}, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionGroupByTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionGroupByTest.scala index 7cdf4673d..5dbce4bc3 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionGroupByTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionGroupByTest.scala @@ -14,10 +14,10 @@ package raw.compiler.rql2.tests.builtin.collection import raw.compiler.utils._ import raw.compiler.rql2.errors.KeyNotComparable -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait CollectionGroupByTest extends CompilerTestContext with LocalLocationsTestContext { +trait CollectionGroupByTest extends Rql2CompilerTestContext with LocalLocationsTestContext { private val lineitemType = """record( | l_orderkey: int, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionJoinTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionJoinTest.scala index f974c290f..a3ffabbf6 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionJoinTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionJoinTest.scala @@ -14,10 +14,10 @@ package raw.compiler.rql2.tests.builtin.collection import raw.compiler.utils._ import raw.compiler.rql2.errors.KeyNotComparable -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait CollectionJoinTest extends CompilerTestContext with LocalLocationsTestContext { +trait CollectionJoinTest extends Rql2CompilerTestContext with LocalLocationsTestContext { test(snapi"""let regions = Csv.InferAndRead("$tpchRegionCsvLocal"), | nations = Csv.InferAndRead("$tpchNationCsvLocal") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionMinMaxTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionMinMaxTest.scala index 0eabece94..875798f33 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionMinMaxTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionMinMaxTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.builtin.collection import raw.compiler.rql2.errors.ItemsNotComparable -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait CollectionMinMaxTest extends CompilerTestContext { +trait CollectionMinMaxTest extends Rql2CompilerTestContext { // Date test(""" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionMkStringTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionMkStringTest.scala index fc70bc85b..a9e3d11fb 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionMkStringTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionMkStringTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin.collection -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait CollectionMkStringTest extends CompilerTestContext { +trait CollectionMkStringTest extends Rql2CompilerTestContext { test("""let items = Collection.Build() |in Collection.MkString(items, sep="|")""".stripMargin)(_ should evaluateTo(""" "" """)) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionOrderByTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionOrderByTest.scala index 61adf7d94..7036d17d7 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionOrderByTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionOrderByTest.scala @@ -14,10 +14,10 @@ package raw.compiler.rql2.tests.builtin.collection import raw.compiler.utils._ import raw.compiler.rql2.errors.{InvalidOrderSpec, KeyNotComparable, OrderSpecMustFollowOrderingFunction} -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait CollectionOrderByTest extends CompilerTestContext with LocalLocationsTestContext { +trait CollectionOrderByTest extends Rql2CompilerTestContext with LocalLocationsTestContext { private val coolBandsWithoutHeader = tempFile("""Bee Gees|Maurice|Gibb|1949 |Bee Gees|Robin|Gibb|1949 diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionPackageTest.scala index 5aefb4e5a..28202f693 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionPackageTest.scala @@ -14,11 +14,11 @@ package raw.compiler.rql2.tests.builtin.collection import raw.compiler.utils._ import raw.compiler.rql2.errors.ItemsNotComparable -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import java.nio.file.Path -trait CollectionPackageTest extends CompilerTestContext { +trait CollectionPackageTest extends Rql2CompilerTestContext { // a test to check if there are multiple instances of generators test("""let a = Collection.Build(1,2,3), diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionRangeTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionRangeTest.scala index 53c2512db..08a4b6bb3 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionRangeTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionRangeTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin.collection -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait CollectionRangeTest extends CompilerTestContext { +trait CollectionRangeTest extends Rql2CompilerTestContext { // Long.Range diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionUnionTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionUnionTest.scala index 8ba3cb263..309c86141 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionUnionTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/collection/CollectionUnionTest.scala @@ -13,10 +13,10 @@ package raw.compiler.rql2.tests.builtin.collection import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait CollectionUnionTest extends CompilerTestContext with LocalLocationsTestContext { +trait CollectionUnionTest extends Rql2CompilerTestContext with LocalLocationsTestContext { test("Collection.Union(Collection.Build(1,2,3), Collection.Build(4,5,6))")(_ should evaluateTo("[1,2,3,4,5,6]")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/AwsPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/AwsPackageTest.scala index 472036ee0..ee36f6f38 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/AwsPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/AwsPackageTest.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.builtin.credentials -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext -trait AwsPackageTest extends CompilerTestContext with CredentialsTestContext { +trait AwsPackageTest extends Rql2CompilerTestContext with CredentialsTestContext { val accessKeyId = sys.env("RAW_AWS_ACCESS_KEY_ID") val secretAccessKey = sys.env("RAW_AWS_SECRET_ACCESS_KEY") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/EnvironmentPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/EnvironmentPackageTest.scala index 598793204..e21b0841b 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/EnvironmentPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/EnvironmentPackageTest.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.builtin.credentials -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext -trait EnvironmentPackageTest extends CompilerTestContext with CredentialsTestContext { +trait EnvironmentPackageTest extends Rql2CompilerTestContext with CredentialsTestContext { secret(authorizedUser, "my-secret", "my-secret-value") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/LocationPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/LocationPackageTest.scala index d7014344d..712a1de60 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/LocationPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/LocationPackageTest.scala @@ -14,11 +14,11 @@ package raw.compiler.rql2.tests.builtin.credentials import raw.creds.dropbox.DropboxTestCreds import raw.creds.s3.S3TestCreds -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext trait LocationPackageTest - extends CompilerTestContext + extends Rql2CompilerTestContext with CredentialsTestContext with DropboxTestCreds with S3TestCreds { diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/MySQLPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/MySQLPackageTest.scala index 76950346b..d1c42c1cc 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/MySQLPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/MySQLPackageTest.scala @@ -12,11 +12,11 @@ package raw.compiler.rql2.tests.builtin.credentials -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext import raw.creds.jdbc.RDBMSTestCreds -trait MySQLPackageTest extends CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { +trait MySQLPackageTest extends Rql2CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { val mysqlRegDb = "registered-db" val mysqlTable = "tbl1" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/OraclePackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/OraclePackageTest.scala index e5ca405c9..ed8eeb02d 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/OraclePackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/OraclePackageTest.scala @@ -12,11 +12,11 @@ package raw.compiler.rql2.tests.builtin.credentials -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext import raw.creds.jdbc.RDBMSTestCreds -trait OraclePackageTest extends CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { +trait OraclePackageTest extends Rql2CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { val oracleDb = "rawdb" val oracleSchema = "rawtest" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/PostgreSQLPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/PostgreSQLPackageTest.scala index 726a28118..8b43b90af 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/PostgreSQLPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/PostgreSQLPackageTest.scala @@ -12,11 +12,11 @@ package raw.compiler.rql2.tests.builtin.credentials -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext import raw.creds.jdbc.RDBMSTestCreds -trait PostgreSQLPackageTest extends CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { +trait PostgreSQLPackageTest extends Rql2CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { val pgSchema = "rdbmstest" val pgTable = "tbl1" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/S3PackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/S3PackageTest.scala index a9ce32f48..40d17d8f2 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/S3PackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/S3PackageTest.scala @@ -13,10 +13,10 @@ package raw.compiler.rql2.tests.builtin.credentials import raw.creds.s3.S3TestCreds -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext -trait S3PackageTest extends CompilerTestContext with CredentialsTestContext with S3TestCreds { +trait S3PackageTest extends Rql2CompilerTestContext with CredentialsTestContext with S3TestCreds { // reading a non public s3 bucket passing credentials in the location settings test(s"""let diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/SnowflakePackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/SnowflakePackageTest.scala index c84a0605d..44ce94fe6 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/SnowflakePackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/SnowflakePackageTest.scala @@ -12,12 +12,12 @@ package raw.compiler.rql2.tests.builtin.credentials -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext import raw.creds.jdbc.RDBMSTestCreds import raw.sources.jdbc.snowflake.SnowflakeClient -trait SnowflakePackageTest extends CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { +trait SnowflakePackageTest extends Rql2CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { val snowflakeSchema = "PUBLIC" val snowflakeMainTable = "TBL1" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/SqlServerPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/SqlServerPackageTest.scala index 5b6f2b344..6db6ff6c7 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/SqlServerPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/credentials/SqlServerPackageTest.scala @@ -12,11 +12,11 @@ package raw.compiler.rql2.tests.builtin.credentials -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext import raw.creds.jdbc.RDBMSTestCreds -trait SqlServerPackageTest extends CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { +trait SqlServerPackageTest extends Rql2CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { val sqlServDb = "rawtest" val sqlServRegDb = "registered-db" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListDistinctTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListDistinctTest.scala index bd44dd74a..5428bcb80 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListDistinctTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListDistinctTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.builtin.list import raw.compiler.rql2.errors.ItemsNotComparable -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ListDistinctTest extends CompilerTestContext { +trait ListDistinctTest extends Rql2CompilerTestContext { test("""let numbers = [5, 2, 4, 2, 2, 4, 5] |in List.Distinct(numbers)""".stripMargin)(_ should evaluateTo("[2, 4, 5]")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListExplodeTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListExplodeTest.scala index b83537bb9..a0ebef0cb 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListExplodeTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListExplodeTest.scala @@ -13,10 +13,10 @@ package raw.compiler.rql2.tests.builtin.list import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait ListExplodeTest extends CompilerTestContext with LocalLocationsTestContext { +trait ListExplodeTest extends Rql2CompilerTestContext with LocalLocationsTestContext { private val nba = tempFile("""[ | {"team": {"name": "Bulls", "city": "Chicago"}, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListGroupByTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListGroupByTest.scala index 123a84c67..00c4b0218 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListGroupByTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListGroupByTest.scala @@ -14,10 +14,10 @@ package raw.compiler.rql2.tests.builtin.list import raw.compiler.utils._ import raw.compiler.rql2.errors.KeyNotComparable -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait ListGroupByTest extends CompilerTestContext with LocalLocationsTestContext { +trait ListGroupByTest extends Rql2CompilerTestContext with LocalLocationsTestContext { private val lineitemType = """record( | l_orderkey: int, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListJoinTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListJoinTest.scala index 6b14c2fae..d3448ebbe 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListJoinTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListJoinTest.scala @@ -14,10 +14,10 @@ package raw.compiler.rql2.tests.builtin.list import raw.compiler.utils._ import raw.compiler.rql2.errors.KeyNotComparable -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait ListJoinTest extends CompilerTestContext with LocalLocationsTestContext { +trait ListJoinTest extends Rql2CompilerTestContext with LocalLocationsTestContext { private val listOfCountries = """[ | {region: "AFRICA", nation: "ALGERIA"}, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListMinMaxTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListMinMaxTest.scala index 3885e6b70..0577336a4 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListMinMaxTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListMinMaxTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.builtin.list import raw.compiler.rql2.errors.ItemsNotComparable -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ListMinMaxTest extends CompilerTestContext { +trait ListMinMaxTest extends Rql2CompilerTestContext { // Date test(""" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListMkStringTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListMkStringTest.scala index 6947280dd..87186e314 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListMkStringTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListMkStringTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.builtin.list -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ListMkStringTest extends CompilerTestContext { +trait ListMkStringTest extends Rql2CompilerTestContext { test("""let items = List.Build() |in List.MkString(items, sep="|")""".stripMargin)(_ should evaluateTo(""" "" """)) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListOrderByTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListOrderByTest.scala index e19571093..31043e819 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListOrderByTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListOrderByTest.scala @@ -14,10 +14,10 @@ package raw.compiler.rql2.tests.builtin.list import raw.compiler.utils._ import raw.compiler.rql2.errors.{InvalidOrderSpec, KeyNotComparable} -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait ListOrderByTest extends CompilerTestContext with LocalLocationsTestContext { +trait ListOrderByTest extends Rql2CompilerTestContext with LocalLocationsTestContext { // using String.ReadLines test(snapi"""let regions = List.From(Collection.Transform( diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListPackageTest.scala index 8f9ce08c3..ade63ff4f 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListPackageTest.scala @@ -14,11 +14,11 @@ package raw.compiler.rql2.tests.builtin.list import raw.compiler.utils._ import raw.compiler.rql2.errors.ItemsNotComparable -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import java.nio.file.Path -trait ListPackageTest extends CompilerTestContext { +trait ListPackageTest extends Rql2CompilerTestContext { test("""["Hello", Error.Build("Argh!!"), null]""") { _ should evaluateTo("""["Hello", Error.Build("Argh!!"), null]""") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListUnionTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListUnionTest.scala index bc73229e6..4037aa442 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListUnionTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/builtin/list/ListUnionTest.scala @@ -13,10 +13,10 @@ package raw.compiler.rql2.tests.builtin.list import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait ListUnionTest extends CompilerTestContext with LocalLocationsTestContext { +trait ListUnionTest extends Rql2CompilerTestContext with LocalLocationsTestContext { test("List.Union([1,2,3], [4,5,6])")(_ should evaluateTo("[1,2,3,4,5,6]")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/hints/SemanticAnalyzerHintsTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/hints/SemanticAnalyzerHintsTest.scala index a169696e6..e2e8a95b7 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/hints/SemanticAnalyzerHintsTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/hints/SemanticAnalyzerHintsTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.hints -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait SemanticAnalyzerHintsTest extends CompilerTestContext { +trait SemanticAnalyzerHintsTest extends Rql2CompilerTestContext { test("""Rekord.Build(a=1)""")(it => it should typeErrorAs("did you mean Record.Build?")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspAiValidateTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspAiValidateTest.scala index 7824ee9d2..2ba1c8f18 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspAiValidateTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspAiValidateTest.scala @@ -14,9 +14,9 @@ package raw.compiler.rql2.tests.lsp import raw.client.api.ValidateResponse import raw.compiler.rql2.errors.OutputTypeRequiredForRecursiveFunction -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LspAiValidateTest extends CompilerTestContext { +trait LspAiValidateTest extends Rql2CompilerTestContext { test("AI validate package that does not exist") { _ => val code = """let diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspBrokenCodeTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspBrokenCodeTest.scala index cbecb7c0f..1749225bc 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspBrokenCodeTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspBrokenCodeTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.lsp import raw.client.api._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LspBrokenCodeTest extends CompilerTestContext { +trait LspBrokenCodeTest extends Rql2CompilerTestContext { test("broken code hover test") { _ => val code = """let diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspCommentsFormatTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspCommentsFormatTest.scala index 76d9bc155..3a217e568 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspCommentsFormatTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspCommentsFormatTest.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.lsp -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.client.api._ -trait LspCommentsFormatTest extends CompilerTestContext { +trait LspCommentsFormatTest extends Rql2CompilerTestContext { def assertFormattedCode( code: String, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspCompilationMessagesTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspCompilationMessagesTest.scala index c7d5d2928..0dd117257 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspCompilationMessagesTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspCompilationMessagesTest.scala @@ -14,9 +14,9 @@ package raw.compiler.rql2.tests.lsp import raw.client.api.{ErrorMessage, WarningMessage} import raw.compiler.base.errors.{MissingSecretWarning, UnknownDecl} -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LspCompilationMessagesTest extends CompilerTestContext { +trait LspCompilationMessagesTest extends Rql2CompilerTestContext { test("should return a waning") { _ => val code = """let a = Environment.Secret("a") in a""".stripMargin diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspDefinitionTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspDefinitionTest.scala index 258557f29..03c713f31 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspDefinitionTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspDefinitionTest.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.lsp -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.client.api._ -trait LspDefinitionTest extends CompilerTestContext { +trait LspDefinitionTest extends Rql2CompilerTestContext { test("go to definition identifier at usage test") { _ => val code = """let diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspDotAutoCompleteTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspDotAutoCompleteTest.scala index b4fbdc6b8..8727740af 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspDotAutoCompleteTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspDotAutoCompleteTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.lsp import raw.client.api._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LspDotAutoCompleteTest extends CompilerTestContext { +trait LspDotAutoCompleteTest extends Rql2CompilerTestContext { private def dotAutoCompleteTest(code: String, line: Int, col: Int, expectedFields: Seq[(String, String)]): Unit = { val AutoCompleteResponse(entries) = dotAutoComplete(code, Pos(line, col)) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspFormatCodeTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspFormatCodeTest.scala index 4bf0b9f78..95e0944cb 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspFormatCodeTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspFormatCodeTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.lsp import raw.client.api.FormatCodeResponse -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LspFormatCodeTest extends CompilerTestContext { +trait LspFormatCodeTest extends Rql2CompilerTestContext { def assertFormattedCode(code: String, expected: String) = { val FormatCodeResponse(Some(formattedCode)) = formatCode(code) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspHoverTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspHoverTest.scala index 2bc74c72c..d67676dd8 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspHoverTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspHoverTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.lsp import raw.client.api._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LspHoverTest extends CompilerTestContext { +trait LspHoverTest extends Rql2CompilerTestContext { test("hover identifier at definition test") { _ => val code = """let diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspRenameTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspRenameTest.scala index cc5f827c3..85b9e4289 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspRenameTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspRenameTest.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.lsp -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.client.api._ -trait LspRenameTest extends CompilerTestContext { +trait LspRenameTest extends Rql2CompilerTestContext { test("rename identifier at usage test") { _ => val code = """let diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspValidateTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspValidateTest.scala index 6234aadee..2895428d6 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspValidateTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspValidateTest.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.lsp -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.client.api._ -trait LspValidateTest extends CompilerTestContext { +trait LspValidateTest extends Rql2CompilerTestContext { test("validate simple code test") { _ => val code = """String.Lower("Hello")""".stripMargin diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspWordAutoCompleteTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspWordAutoCompleteTest.scala index 0e7192145..11a46bab0 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspWordAutoCompleteTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/lsp/LspWordAutoCompleteTest.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.lsp -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.client.api._ -trait LspWordAutoCompleteTest extends CompilerTestContext { +trait LspWordAutoCompleteTest extends Rql2CompilerTestContext { private lazy val allTypes = Seq( ("byte", Some("")), diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/offheap/OffHeapDatasets.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/offheap/OffHeapDatasets.scala index ec026a798..7028fc3ea 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/offheap/OffHeapDatasets.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/offheap/OffHeapDatasets.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.offheap import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait OffHeapDatasets extends CompilerTestContext { +trait OffHeapDatasets extends Rql2CompilerTestContext { protected val N = 100 diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/offheap/OffHeapDistinctTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/offheap/OffHeapDistinctTest.scala index ec207a3fe..9472e438f 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/offheap/OffHeapDistinctTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/offheap/OffHeapDistinctTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.offheap import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait OffHeapDistinctTest extends CompilerTestContext { +trait OffHeapDistinctTest extends Rql2CompilerTestContext { // This is to ensure the test triggers spill to disk. property("raw.runtime.external.disk-block-max-size", "30kB") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/BinaryOutputTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/BinaryOutputTest.scala index 011c8baf3..ef26ba568 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/BinaryOutputTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/BinaryOutputTest.scala @@ -13,13 +13,13 @@ package raw.compiler.rql2.tests.output import org.apache.commons.io.FileUtils -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext import java.io.File import java.nio.file.Files -trait BinaryOutputTest extends CompilerTestContext with LocalLocationsTestContext { +trait BinaryOutputTest extends Rql2CompilerTestContext with LocalLocationsTestContext { option("output-format", "binary") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/CsvOutputTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/CsvOutputTest.scala index 5f791240f..f889dbc8f 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/CsvOutputTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/CsvOutputTest.scala @@ -12,13 +12,13 @@ package raw.compiler.rql2.tests.output -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.compiler.utils._ import raw.utils._ import java.nio.file.Files -trait CsvOutputTest extends CompilerTestContext { +trait CsvOutputTest extends Rql2CompilerTestContext { option("output-format", "csv") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/JsonOutputTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/JsonOutputTest.scala index 67c666d4c..2db9aa0cb 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/JsonOutputTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/JsonOutputTest.scala @@ -12,12 +12,12 @@ package raw.compiler.rql2.tests.output -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.utils._ import java.nio.file.{Files, Path} -trait JsonOutputTest extends CompilerTestContext { +trait JsonOutputTest extends Rql2CompilerTestContext { option("output-format", "json") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/TextOutputTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/TextOutputTest.scala index cd27b37f5..8718391ee 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/TextOutputTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/output/TextOutputTest.scala @@ -12,11 +12,11 @@ package raw.compiler.rql2.tests.output -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import java.nio.file.Files -trait TextOutputTest extends CompilerTestContext { +trait TextOutputTest extends Rql2CompilerTestContext { option("output-format", "text") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/FrontendSyntaxAnalyzerTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/FrontendSyntaxAnalyzerTest.scala index 9b6605d54..30d7924e6 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/FrontendSyntaxAnalyzerTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/FrontendSyntaxAnalyzerTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.parser -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait FrontendSyntaxAnalyzerTest extends CompilerTestContext { +trait FrontendSyntaxAnalyzerTest extends Rql2CompilerTestContext { // Internal node, not visible to the user parser. test(s"""$$package("Collection")""".stripMargin)(it => it shouldNot parse) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/ListSugarTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/ListSugarTest.scala index b727ccd0b..79159adb8 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/ListSugarTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/ListSugarTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.parser -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ListSugarTest extends CompilerTestContext { +trait ListSugarTest extends Rql2CompilerTestContext { test("""[1,2,3]""") { it => it should typeAs("list(int)") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/OperatorPrecedenceTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/OperatorPrecedenceTest.scala index 765eec6d9..334a4025f 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/OperatorPrecedenceTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/OperatorPrecedenceTest.scala @@ -14,9 +14,9 @@ package raw.compiler.rql2.tests.parser import raw.compiler.common.source._ import raw.compiler.rql2.source._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait OperatorPrecedenceTest extends CompilerTestContext { +trait OperatorPrecedenceTest extends Rql2CompilerTestContext { test("""1+2*3""") { it => it should evaluateTo("(1+(2*3))") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/RecordSugarTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/RecordSugarTest.scala index 12e206c2c..962aad7b4 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/RecordSugarTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/parser/RecordSugarTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.parser -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RecordSugarTest extends CompilerTestContext { +trait RecordSugarTest extends Rql2CompilerTestContext { test("""{a: 1, b: "2"}""") { it => it should typeAs("record(a: int, b: string)") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10194Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10194Test.scala index ccb43f169..4227947ab 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10194Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10194Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD10194Test extends CompilerTestContext { +trait RD10194Test extends Rql2CompilerTestContext { private val q = """main(title: string = null, description: string = null, category: string = null, rating: string = null, actor: string = null) = diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10220Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10220Test.scala index 9ecad5fab..34b9a1dda 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10220Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10220Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD10220Test extends CompilerTestContext { +trait RD10220Test extends Rql2CompilerTestContext { test("""Csv.InferAndParse("stringData")""")( _ should (typeAs("collection(record(stringData: undefined))") and evaluateTo("[]")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10723Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10723Test.scala index 3e1373a84..95ccf5b64 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10723Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10723Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD10723Test extends CompilerTestContext { +trait RD10723Test extends Rql2CompilerTestContext { private val qqq = "\"\"\"" test(s"""main() = diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10801Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10801Test.scala index 55b4fb531..e2b92ad53 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10801Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD10801Test.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.compiler.utils.SnapiInterpolator -trait RD10801Test extends CompilerTestContext { +trait RD10801Test extends Rql2CompilerTestContext { private val qqq = "\"\"\"" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD3742Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD3742Test.scala index 41b5b8af1..9d98e0802 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD3742Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD3742Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD3742Test extends CompilerTestContext { +trait RD3742Test extends Rql2CompilerTestContext { val triple = "\"\"\"" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD3784Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD3784Test.scala index 824901319..d03f6fa9c 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD3784Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD3784Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD3784Test extends CompilerTestContext { +trait RD3784Test extends Rql2CompilerTestContext { private val data = tempFile( """v diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD4529Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD4529Test.scala index e8783354d..0ceb9addc 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD4529Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD4529Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD4529Test extends CompilerTestContext { +trait RD4529Test extends Rql2CompilerTestContext { test(""" |let a: float = 1.0f diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD4981Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD4981Test.scala index 477c6be83..93431322c 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD4981Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD4981Test.scala @@ -13,10 +13,10 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait RD4981Test extends CompilerTestContext with LocalLocationsTestContext { +trait RD4981Test extends Rql2CompilerTestContext with LocalLocationsTestContext { test(snapi"""let | data = Csv.InferAndRead("$airportsLocal"), diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5238Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5238Test.scala index 048a51c80..a091d7f1d 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5238Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5238Test.scala @@ -13,10 +13,10 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait RD5238Test extends CompilerTestContext with LocalLocationsTestContext { +trait RD5238Test extends Rql2CompilerTestContext with LocalLocationsTestContext { test(snapi""" |let region1 = Csv.InferAndRead("$tpchRegionCsvLocal"), diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5365Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5365Test.scala index 3a991a4aa..379c05f74 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5365Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5365Test.scala @@ -17,9 +17,9 @@ import org.scalatest.matchers.{MatchResult, Matcher} import raw.utils.TestData import raw.compiler.rql2.FrontendSyntaxAnalyzer import raw.compiler.rql2.source.SourcePrettyPrinter -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5365Test extends CompilerTestContext { +trait RD5365Test extends Rql2CompilerTestContext { private class PrettyPrintAs(expected: String) extends Matcher[TestData] { override def apply(query: TestData): MatchResult = { diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5393Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5393Test.scala index b22aab1a8..1f8890da4 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5393Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5393Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.rql2.errors.CannotDetermineTypeOfParameter -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5393Test extends CompilerTestContext { +trait RD5393Test extends Rql2CompilerTestContext { test("""main(country: string = null,code: string = null) = | let diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5412Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5412Test.scala index 0a9aae86a..b48f49a1c 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5412Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5412Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5412Test extends CompilerTestContext { +trait RD5412Test extends Rql2CompilerTestContext { test("""let | json_type = type record(creation_date: string, entries: list(string)), diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5448Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5448Test.scala index 5cbe0f3e6..27a4296bd 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5448Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5448Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5448Test extends CompilerTestContext { +trait RD5448Test extends Rql2CompilerTestContext { private val ttt = "\"\"\"" private val jsonString = """[ diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5484Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5484Test.scala index a6f998502..976b5d44b 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5484Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5484Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5484Test extends CompilerTestContext { +trait RD5484Test extends Rql2CompilerTestContext { // top-level and correct. test("""Timestamp.Build(2015, 1, 4, 22, 0)""")(_ should run) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5488Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5488Test.scala index 44f8cac2b..d8bf5bea9 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5488Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5488Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5488Test extends CompilerTestContext { +trait RD5488Test extends Rql2CompilerTestContext { // All these tests are valid queries. They fail in the middle of compilation, at L0, with "lines is declared more than once". diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5491Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5491Test.scala index dc8eee0e3..e83e757f4 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5491Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5491Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5491Test extends CompilerTestContext { +trait RD5491Test extends Rql2CompilerTestContext { test(s"""let | query = \"\"\"SELECT (?item as ?cat) ?itemLabel diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5644Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5644Test.scala index a6cd3b66e..8f55a8a24 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5644Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5644Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5644Test extends CompilerTestContext { +trait RD5644Test extends Rql2CompilerTestContext { // Basic reference behavior. The function parameter isn't type and inherits the list item type. Everything matches. test(""" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5679Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5679Test.scala index 72120a170..27c9f4305 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5679Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5679Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5679Test extends CompilerTestContext { +trait RD5679Test extends Rql2CompilerTestContext { // regular XML file (types as record) with a list inside private val xml = tempFile(""" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5685Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5685Test.scala index b11397163..a1446da76 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5685Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5685Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5685Test extends CompilerTestContext { +trait RD5685Test extends Rql2CompilerTestContext { test("""let itemType = type int, | listType = type list(itemType), diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5691Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5691Test.scala index 8502bb3ba..9d1c2e99e 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5691Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5691Test.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext -trait RD5691Test extends CompilerTestContext with LocalLocationsTestContext { +trait RD5691Test extends Rql2CompilerTestContext with LocalLocationsTestContext { test(s""" |let issueType = type record( diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5697Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5697Test.scala index 3a80482de..0f4fab7e2 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5697Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5697Test.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.compiler.utils._ -trait RD5697Test extends CompilerTestContext { +trait RD5697Test extends Rql2CompilerTestContext { private val jsonFile = tempFile("""{"a": 12, "b": 14}""") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5714Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5714Test.scala index 18f77e01e..6cdb71c0b 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5714Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5714Test.scala @@ -13,11 +13,11 @@ package raw.compiler.rql2.tests.regressions import java.nio.file.Files -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import scala.io.Source -trait RD5714Test extends CompilerTestContext { +trait RD5714Test extends Rql2CompilerTestContext { test("""let colA = [{id: 1, name: "john"}], | colB = [{id: 2, firstName: "john"}], diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5722Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5722Test.scala index 71429ea90..750a95e0a 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5722Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5722Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5722Test extends CompilerTestContext { +trait RD5722Test extends Rql2CompilerTestContext { test("""let data = Collection.Build({ | a: { b: 123} diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD572Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD572Test.scala index daccebba9..1fd14300a 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD572Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD572Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD572Test extends CompilerTestContext { +trait RD572Test extends Rql2CompilerTestContext { test("-128b") { it => it should typeAs("byte") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5775Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5775Test.scala index 208e75ccd..1ba29616a 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5775Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5775Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5775Test extends CompilerTestContext { +trait RD5775Test extends Rql2CompilerTestContext { test("""let data = Http.Get("https://jira.atlassian.com/rest/api/latest/search", args=[{"jql", "fixVersion=9.0.0"}]), | r = Json.InferAndRead(data), | issues = Collection.Transform(r.issues, i -> { diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5779Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5779Test.scala index c1621b16f..0715d7c7f 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5779Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5779Test.scala @@ -13,11 +13,11 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import java.nio.file.Path -trait RD5779Test extends CompilerTestContext { +trait RD5779Test extends Rql2CompilerTestContext { val data: Path = tempFile("""[ | {"a": 1, "b": 10} |]""".stripMargin) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5784Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5784Test.scala index 38f4beec6..683456db3 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5784Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5784Test.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.compiler.utils._ -trait RD5784Test extends CompilerTestContext { +trait RD5784Test extends Rql2CompilerTestContext { private val xmlFile = tempFile(""" | diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5785Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5785Test.scala index dcef27dea..421b72216 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5785Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5785Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5785Test extends CompilerTestContext { +trait RD5785Test extends Rql2CompilerTestContext { // The only way of this returning true is if all values in the list are the same. // Almost impossible with 5 random values. diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5786Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5786Test.scala index fba807443..785b711f9 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5786Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5786Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5786Test extends CompilerTestContext { +trait RD5786Test extends Rql2CompilerTestContext { test("""true == false""") { _ should evaluateTo(""" false """) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5797Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5797Test.scala index e68f16fd1..67f4423e1 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5797Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5797Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5797Test extends CompilerTestContext { +trait RD5797Test extends Rql2CompilerTestContext { // "raw.eu.auth0.com" is a wrong value, it should be 'auth0' for example test(""" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5851Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5851Test.scala index 7363d3a37..8d2621edf 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5851Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5851Test.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.client.api._ -trait RD5851Test extends CompilerTestContext { +trait RD5851Test extends Rql2CompilerTestContext { def autoCompleteNames(entries: Array[Completion]): Seq[String] = { entries.map { diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5884Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5884Test.scala index dc285c5a9..fa4dbbe45 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5884Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5884Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5884Test extends CompilerTestContext { +trait RD5884Test extends Rql2CompilerTestContext { test("""let f(x: int, y: int = 12) = 3.14 + x + y |in f(1)""".stripMargin)(_ should run) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5893Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5893Test.scala index 928a80e24..59365d455 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5893Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5893Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5893Test extends CompilerTestContext { +trait RD5893Test extends Rql2CompilerTestContext { // this has a list of text private val data = tempFile(""" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5914Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5914Test.scala index 35e3ab1ed..0c2a6ec42 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5914Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5914Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5914Test extends CompilerTestContext { +trait RD5914Test extends Rql2CompilerTestContext { test("""let item1 = {name: "coffee machine", price: 200, price: 199}, // price is duplicated, price is an int | item2 = {name: "coffee machine", price: 200.00, price: 199.99} // price is duplicated, price is a double diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5920Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5920Test.scala index 8f3c36e55..f38b846d7 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5920Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5920Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5920Test extends CompilerTestContext { +trait RD5920Test extends Rql2CompilerTestContext { test("""let f(x: int) = x * 10 |in f(10)""".stripMargin)(_ should evaluateTo("100")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5921Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5921Test.scala index 76ed47cf1..cffe87623 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5921Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5921Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5921Test extends CompilerTestContext { +trait RD5921Test extends Rql2CompilerTestContext { val data1 = tempFile("""1 |2 diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5925Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5925Test.scala index 46e53ba77..e306507d0 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5925Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5925Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5925Test extends CompilerTestContext { +trait RD5925Test extends Rql2CompilerTestContext { test("""let c = Collection.Build(1, 2, 3, 4) |in Collection.Filter(c, s -> null)""".stripMargin) { it => diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5932Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5932Test.scala index 0b75c38cd..60a018485 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5932Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5932Test.scala @@ -14,9 +14,9 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ import raw.creds.s3.S3TestCreds -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5932Test extends CompilerTestContext with S3TestCreds { +trait RD5932Test extends Rql2CompilerTestContext with S3TestCreds { val data = tempFile("""[ | {"id": 1, "network_interface": "eni-08b85cc07294f82bf"}, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5968Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5968Test.scala index fea47a09e..810e4200f 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5968Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5968Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5968Test extends CompilerTestContext { +trait RD5968Test extends Rql2CompilerTestContext { private val cdataFile = tempFile(""" | diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5971Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5971Test.scala index fd5ee42d8..64c20a661 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5971Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5971Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5971Test extends CompilerTestContext { +trait RD5971Test extends Rql2CompilerTestContext { // error when type isn't supported test(s"""[{a: "binary", b: [1,2,3,4]}]""") { it => diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5979Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5979Test.scala index c02ef1d3c..49be2fd3b 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5979Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD5979Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD5979Test extends CompilerTestContext { +trait RD5979Test extends Rql2CompilerTestContext { test("""[{a: 12, b: 14}, {c: 23, d: 54}]""")(_ should runErrorAs("expected compatible with")) test("""[{a: 12, b: 14}, {a: 23, d: 54}]""")(_ should runErrorAs("expected compatible with")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD7924Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD7924Test.scala index 9d00dad1b..db9a30da5 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD7924Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD7924Test.scala @@ -13,11 +13,11 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import java.nio.file.Path -trait RD7924Test extends CompilerTestContext { +trait RD7924Test extends Rql2CompilerTestContext { val string: Path = tempFile(""" "Hello!" """) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD7974Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD7974Test.scala index 496816272..f2fe43cdc 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD7974Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD7974Test.scala @@ -13,12 +13,12 @@ package raw.compiler.rql2.tests.regressions import org.scalatest.BeforeAndAfterEach -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.utils._ import java.nio.file.Files -trait RD7974Test extends CompilerTestContext with BeforeAndAfterEach { +trait RD7974Test extends Rql2CompilerTestContext with BeforeAndAfterEach { private val tmpFile = Files.createTempFile("csv-output-test", ".csv") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8530Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8530Test.scala index dc5b383c4..5723dabac 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8530Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8530Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import org.scalatest.BeforeAndAfterEach -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD8530Test extends CompilerTestContext with BeforeAndAfterEach { +trait RD8530Test extends Rql2CompilerTestContext with BeforeAndAfterEach { test("""List.Filter([1,2,3,4], n -> n > 2, a = 12)""".stripMargin)( _ should typeErrorAs("no optional arguments expected") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8764Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8764Test.scala index ad7c4869c..b237e9f0b 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8764Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8764Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import com.typesafe.scalalogging.StrictLogging -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD8764Test extends CompilerTestContext with StrictLogging { +trait RD8764Test extends Rql2CompilerTestContext with StrictLogging { test(""" |let f: (record(_1: int, _2: int)) -> bool = (x: int, y: int) -> x == y diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8935Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8935Test.scala index 84531614e..ae84f26b9 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8935Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8935Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD8935Test extends CompilerTestContext { +trait RD8935Test extends Rql2CompilerTestContext { private val vowels = tempFile("""a |e diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8993Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8993Test.scala index c3ea6980b..6e5590fac 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8993Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD8993Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD8993Test extends CompilerTestContext { +trait RD8993Test extends Rql2CompilerTestContext { test("""apply(f: int -> bool) = f(1) |apply((x: int) -> true)""".stripMargin)(_ should evaluateTo("true")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9137Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9137Test.scala index ca8c653bf..0431cddec 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9137Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9137Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import com.typesafe.scalalogging.StrictLogging -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD9137Test extends CompilerTestContext with StrictLogging { +trait RD9137Test extends Rql2CompilerTestContext with StrictLogging { test("""Json.InferAndRead("https://raw-tutorial.s3.eu-west-1.amazonaws.com/patients.json")""".stripMargin)( _ should run diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9228Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9228Test.scala index 59e06e1bb..97cc45be0 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9228Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9228Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD9228Test extends CompilerTestContext { +trait RD9228Test extends Rql2CompilerTestContext { // pass a plain URL. It will be turned into a location, directly passed as a parameter. test(""" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9229Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9229Test.scala index 33a8a945a..a6bfc0026 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9229Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9229Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD9229Test extends CompilerTestContext { +trait RD9229Test extends Rql2CompilerTestContext { test(s"""[{a: "binary", b: [1,2,3,4]}]""") { it => option("output-format", "binary") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9255Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9255Test.scala index 4761f627e..3cde06f71 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9255Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9255Test.scala @@ -13,12 +13,12 @@ package raw.compiler.rql2.tests.regressions import org.scalatest.EitherValues -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.client.api._ import java.time.{Duration, LocalDate, LocalDateTime, LocalTime} -trait RD9255Test extends CompilerTestContext with EitherValues { +trait RD9255Test extends Rql2CompilerTestContext with EitherValues { private val declarations = """ |string_func(x: string) = String.Length(x) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9359Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9359Test.scala index 092886822..6b44ba45d 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9359Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9359Test.scala @@ -12,12 +12,12 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.compiler.utils._ import java.nio.file.{Files, Path} -trait RD9359Test extends CompilerTestContext { +trait RD9359Test extends Rql2CompilerTestContext { private val duplicateCsvString = """a,b,a |1,2,3 diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9409Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9409Test.scala index 2b3d3f1d6..3c1112992 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9409Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9409Test.scala @@ -12,10 +12,10 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.client.api._ -trait RD9409Test extends CompilerTestContext { +trait RD9409Test extends Rql2CompilerTestContext { test("""let | a = 1, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9445Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9445Test.scala index 18077e884..d55536894 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9445Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9445Test.scala @@ -14,12 +14,12 @@ package raw.compiler.rql2.tests.regressions import org.scalatest.matchers.{MatchResult, Matcher} import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import java.nio.file.Files import scala.io.Source -trait RD9445Test extends CompilerTestContext { +trait RD9445Test extends Rql2CompilerTestContext { def outputAs(expected: String, format: String = "json") = new OutputAs(expected, format) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9479Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9479Test.scala index 28284d0e5..4eb641348 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9479Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9479Test.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.regressions import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD9479Test extends CompilerTestContext { +trait RD9479Test extends Rql2CompilerTestContext { private val recordData = tempFile("""[{"a": 1, "b": 10, "c": 100}]""") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9485Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9485Test.scala index 18aa853c2..3196300ac 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9485Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9485Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD9485Test extends CompilerTestContext { +trait RD9485Test extends Rql2CompilerTestContext { property("raw.inferrer.local.xml.sample-size", "2") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9554Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9554Test.scala index aafa8a2f3..05136b124 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9554Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9554Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD9554Test extends CompilerTestContext { +trait RD9554Test extends Rql2CompilerTestContext { test("""let range = Int.Range(0,5) |in Collection.Union(range, range)""".stripMargin) { it => diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9616Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9616Test.scala index fc6e35c5c..57a96c891 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9616Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9616Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD9616Test extends CompilerTestContext { +trait RD9616Test extends Rql2CompilerTestContext { test( """let diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9932Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9932Test.scala index f36d1d146..f0feb0b28 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9932Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/RD9932Test.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.regressions -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait RD9932Test extends CompilerTestContext { +trait RD9932Test extends Rql2CompilerTestContext { val ttt = "\"\"\"" test(s"""Json.Parse( diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD3084Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD3084Test.scala index 338a5bbae..f4b70bffb 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD3084Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD3084Test.scala @@ -12,11 +12,11 @@ package raw.compiler.rql2.tests.regressions.credentials -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext import raw.creds.jdbc.RDBMSTestCreds -trait RD3084Test extends CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { +trait RD3084Test extends Rql2CompilerTestContext with CredentialsTestContext with RDBMSTestCreds { rdbms(authorizedUser, "mysql-test", mysqlCreds) rdbms(authorizedUser, "postgres-test", pgsqlCreds) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD4445Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD4445Test.scala index 635b46922..f2965ed45 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD4445Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD4445Test.scala @@ -12,11 +12,11 @@ package raw.compiler.rql2.tests.regressions.credentials -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext import raw.creds.dropbox.DropboxTestCreds -trait RD4445Test extends CompilerTestContext with CredentialsTestContext with DropboxTestCreds { +trait RD4445Test extends Rql2CompilerTestContext with CredentialsTestContext with DropboxTestCreds { dropbox(authorizedUser, dropboxToken) oauth(authorizedUser, "rawlabs-dropbox", dropboxAccessTokenCredential) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD5932Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD5932Test.scala index 4bcddc562..a3f92e646 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD5932Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/regressions/credentials/RD5932Test.scala @@ -13,10 +13,10 @@ package raw.compiler.rql2.tests.regressions.credentials import raw.creds.s3.S3TestCreds -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.creds.api.CredentialsTestContext -trait RD5932Test extends CompilerTestContext with CredentialsTestContext with S3TestCreds { +trait RD5932Test extends Rql2CompilerTestContext with CredentialsTestContext with S3TestCreds { s3Bucket(authorizedUser, UnitTestPrivateBucket) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BasicStagedCompilerTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BasicStagedCompilerTest.scala index 75288b964..c3858bbbe 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BasicStagedCompilerTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BasicStagedCompilerTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BasicStagedCompilerTest extends CompilerTestContext { +trait BasicStagedCompilerTest extends Rql2CompilerTestContext { test("""TestPackage.ByteValueArg(22b)""")(_ should evaluateTo("{arg: 22b}")) test("""TestPackage.ShortValueArg(22s)""")(_ should evaluateTo("{arg: 22s}")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpAndTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpAndTest.scala index 213d3da7a..674fded00 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpAndTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpAndTest.scala @@ -14,9 +14,9 @@ package raw.compiler.rql2.tests.spec import org.scalatest.prop.TableDrivenPropertyChecks import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpAndTest extends CompilerTestContext with TableDrivenPropertyChecks { +trait BinaryExpAndTest extends Rql2CompilerTestContext with TableDrivenPropertyChecks { test("""true and true""")(_ should evaluateTo("true")) test("""true and false""")(_ should evaluateTo("false")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpDivTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpDivTest.scala index 6e5e4d974..c1076ed96 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpDivTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpDivTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpDivTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpDivTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("""4 / 2""") { it => it should typeAs("int") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpEqTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpEqTest.scala index 5a023aa86..770679b01 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpEqTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpEqTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpEqTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpEqTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("1 == 1")(it => it should evaluateTo("true")) test("1 == 2")(it => it should evaluateTo("false")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpGeTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpGeTest.scala index c86caa874..fdb6e4ffa 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpGeTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpGeTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpGeTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpGeTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("1 >= 1")(it => it should evaluateTo("true")) test("1 >= 2")(it => it should evaluateTo("false")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpGtTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpGtTest.scala index 66946ecf2..2dd2dbf67 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpGtTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpGtTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpGtTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpGtTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("1 > 1")(it => it should evaluateTo("false")) test("1 > 2")(it => it should evaluateTo("false")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpLeTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpLeTest.scala index ff64502ad..e1183e8f5 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpLeTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpLeTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpLeTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpLeTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("1 <= 1")(it => it should evaluateTo("true")) test("1 <= 2")(it => it should evaluateTo("true")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpLtTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpLtTest.scala index b8f360178..fb7250644 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpLtTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpLtTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpLtTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpLtTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("1 < 1")(it => it should evaluateTo("false")) test("1 < 2")(it => it should evaluateTo("true")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpModTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpModTest.scala index 933a01b7f..6012509bf 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpModTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpModTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpModTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpModTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("""5 % 3""") { it => it should typeAs("int") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpMultTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpMultTest.scala index 609106120..06bf4d565 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpMultTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpMultTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpMultTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpMultTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("""1 * 1""") { it => it should typeAs("int") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpNeqTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpNeqTest.scala index b68575495..a7924c6af 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpNeqTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpNeqTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpNeqTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpNeqTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("1 != 1")(it => it should evaluateTo("false")) test("1 != 2")(it => it should evaluateTo("true")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpOrTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpOrTest.scala index 56e7a74c9..1b7019d29 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpOrTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpOrTest.scala @@ -14,9 +14,9 @@ package raw.compiler.rql2.tests.spec import org.scalatest.prop.TableDrivenPropertyChecks import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpOrTest extends CompilerTestContext with TableDrivenPropertyChecks { +trait BinaryExpOrTest extends Rql2CompilerTestContext with TableDrivenPropertyChecks { test("""true or true""")(_ should evaluateTo("true")) test("""true or false""")(_ should evaluateTo("true")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpPlusTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpPlusTest.scala index 67b195b7d..fa7caba19 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpPlusTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpPlusTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpPlusTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpPlusTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("""1 + 1""") { it => it should typeAs("int") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpSubTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpSubTest.scala index 4ef861db6..cc652cdec 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpSubTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/BinaryExpSubTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait BinaryExpSubTest extends CompilerTestContext with CombinationSpecTestHelper { +trait BinaryExpSubTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("""1 - 1""") { it => it should typeAs("int") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ClosureTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ClosureTest.scala index 493a670e9..f9a5df2eb 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ClosureTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ClosureTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ClosureTest extends CompilerTestContext { +trait ClosureTest extends Rql2CompilerTestContext { test("""let functions = | List.Transform([1,2,3], diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ConstTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ConstTest.scala index 079ea6965..bfda3c890 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ConstTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ConstTest.scala @@ -15,9 +15,9 @@ package raw.compiler.rql2.tests.spec import org.scalatest.prop.TableDrivenPropertyChecks import raw.utils.TestData import raw.compiler.rql2.source.{Rql2BoolType, Rql2IntType, Rql2StringType} -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ConstTest extends CompilerTestContext with TableDrivenPropertyChecks { +trait ConstTest extends Rql2CompilerTestContext with TableDrivenPropertyChecks { test("1") { it => it should typeAs("int") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ErrorsTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ErrorsTest.scala index e84780f13..37e098eb0 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ErrorsTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ErrorsTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ErrorsTest extends CompilerTestContext { +trait ErrorsTest extends Rql2CompilerTestContext { test("""Collection.Count("a")""")(_ shouldNot tipe) test("""Collection.Count(Collection.Count("a"))""")(_ shouldNot tipe) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/FunAbsTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/FunAbsTest.scala index 358ccc972..68d8ef349 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/FunAbsTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/FunAbsTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait FunAbsTest extends CompilerTestContext { +trait FunAbsTest extends Rql2CompilerTestContext { test(""" |let f = (v: int) -> v + 1 diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/IfThenElseTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/IfThenElseTest.scala index a351d27f2..c3b49c09e 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/IfThenElseTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/IfThenElseTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait IfThenElseTest extends CompilerTestContext with CombinationSpecTestHelper { +trait IfThenElseTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test(""" |if true then "a" else "b" diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ImplicitCastTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ImplicitCastTest.scala index 433dff2f6..42274d60f 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ImplicitCastTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ImplicitCastTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ImplicitCastTest extends CompilerTestContext { +trait ImplicitCastTest extends Rql2CompilerTestContext { // compatible options as function param test(s"""let f = (x: int) -> Record.Build(o = x) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/JoinWithTryRowsTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/JoinWithTryRowsTest.scala index c16f8c99c..b716b226a 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/JoinWithTryRowsTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/JoinWithTryRowsTest.scala @@ -12,11 +12,11 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext import raw.sources.filesystem.local.LocalLocationsTestContext import raw.compiler.utils._ -trait JoinWithTryRowsTest extends CompilerTestContext with LocalLocationsTestContext { +trait JoinWithTryRowsTest extends Rql2CompilerTestContext with LocalLocationsTestContext { /* testing joins with failed rows. How a dataset of failed rows is built: by engineering a dataset of nested list of records, and pick one using List.Get so that it sometimes diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetBindTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetBindTest.scala index 51cd3e967..3e72b970c 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetBindTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetBindTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LetBindTest extends CompilerTestContext with CombinationSpecTestHelper { +trait LetBindTest extends Rql2CompilerTestContext with CombinationSpecTestHelper { test("""let x = 1 |in x diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetFunRecTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetFunRecTest.scala index 3267d27d4..6f5209a11 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetFunRecTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetFunRecTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.compiler.rql2.errors.OutputTypeRequiredForRecursiveFunction -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LetFunRecTest extends CompilerTestContext { +trait LetFunRecTest extends Rql2CompilerTestContext { test("""let rec fact(v: int): int = if (v > 1) then v * fact(v - 1) else v |in fact(4) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetFunTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetFunTest.scala index 5ac8602c8..1f19e4128 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetFunTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetFunTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LetFunTest extends CompilerTestContext { +trait LetFunTest extends Rql2CompilerTestContext { test("""let f(x: int) = x + 1 |in f(0) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetTypeTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetTypeTest.scala index 21c3a21e7..171624e1b 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetTypeTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/LetTypeTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait LetTypeTest extends CompilerTestContext { +trait LetTypeTest extends Rql2CompilerTestContext { test(""" |let t = type int, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/MigrationTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/MigrationTest.scala index ea8a9d016..1cedbba0e 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/MigrationTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/MigrationTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.compiler.rql2.source.{Rql2IntType, Rql2IsNullableTypeProperty, Rql2IsTryableTypeProperty, Rql2UndefinedType} -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait MigrationTest extends CompilerTestContext { +trait MigrationTest extends Rql2CompilerTestContext { test("1") { it => it should typeAs("int") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/PackageNameTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/PackageNameTest.scala index ca3bb7e9d..f615dc224 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/PackageNameTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/PackageNameTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait PackageNameTest extends CompilerTestContext { +trait PackageNameTest extends Rql2CompilerTestContext { test("""Record""")(it => it should typeAs("""package("Record")""")) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ProjTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ProjTest.scala index 0d3d3bbd6..7f8851ddc 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ProjTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/ProjTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait ProjTest extends CompilerTestContext { +trait ProjTest extends Rql2CompilerTestContext { test("""let a = {x: 1} |in a.x diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/PropagationTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/PropagationTest.scala index c51b620cc..70b26288c 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/PropagationTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/PropagationTest.scala @@ -12,9 +12,9 @@ package raw.compiler.rql2.tests.spec -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait PropagationTest extends CompilerTestContext { +trait PropagationTest extends Rql2CompilerTestContext { // lists test("""let l = List.Build(1,2,3,2,1) |in TestPackage.StrictArgs(l)""".stripMargin)(_ should (typeAs("float") and evaluateTo("5.0f"))) diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/StagedCompilerTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/StagedCompilerTest.scala index 759743fd5..c05ce75ac 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/StagedCompilerTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/StagedCompilerTest.scala @@ -13,9 +13,9 @@ package raw.compiler.rql2.tests.spec import raw.compiler.utils._ -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait StagedCompilerTest extends CompilerTestContext { +trait StagedCompilerTest extends Rql2CompilerTestContext { val data = tempFile(""" |[ diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/UnaryExpNegTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/UnaryExpNegTest.scala index 3eb54bacf..5077d9abf 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/UnaryExpNegTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/UnaryExpNegTest.scala @@ -14,9 +14,9 @@ package raw.compiler.rql2.tests.spec import org.scalatest.prop.TableDrivenPropertyChecks import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait UnaryExpNegTest extends CompilerTestContext with TableDrivenPropertyChecks { +trait UnaryExpNegTest extends Rql2CompilerTestContext with TableDrivenPropertyChecks { test("- 1") { it => it should typeAs("int") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/UnaryExpNotTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/UnaryExpNotTest.scala index 011e98754..882dabeeb 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/UnaryExpNotTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/tests/spec/UnaryExpNotTest.scala @@ -14,9 +14,9 @@ package raw.compiler.rql2.tests.spec import org.scalatest.prop.TableDrivenPropertyChecks import raw.utils.TestData -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext -trait UnaryExpNotTest extends CompilerTestContext with TableDrivenPropertyChecks { +trait UnaryExpNotTest extends Rql2CompilerTestContext with TableDrivenPropertyChecks { test("""not true""".stripMargin) { it => it should typeAs("bool") it should evaluateTo("false") diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/builtin/TruffleBuiltInTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/builtin/TruffleBuiltInTest.scala deleted file mode 100644 index 165ac20c5..000000000 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/builtin/TruffleBuiltInTest.scala +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.compiler.rql2.tests.builtin - -import raw.compiler.rql2.truffle.TruffleCompilerTestContext -import raw.testing.tags.TruffleTests - -@TruffleTests class BinaryPackageTruffleTest extends TruffleCompilerTestContext with BinaryPackageTest -@TruffleTests class BytePackageTruffleTest extends TruffleCompilerTestContext with BytePackageTest -@TruffleTests class CsvPackageTruffleTest extends TruffleCompilerTestContext with CsvPackageTest -@TruffleTests class DatePackageTruffleTest extends TruffleCompilerTestContext with DatePackageTest -@TruffleTests class DecimalPackageTruffleTest extends TruffleCompilerTestContext with DecimalPackageTest -@TruffleTests class DoublePackageTruffleTest extends TruffleCompilerTestContext with DoublePackageTest -@TruffleTests class EnvironmentPackageTruffleTest extends TruffleCompilerTestContext with EnvironmentPackageTest -@TruffleTests class ErrorPackageTruffleTest extends TruffleCompilerTestContext with ErrorPackageTest -@TruffleTests class FloatPackageTruffleTest extends TruffleCompilerTestContext with FloatPackageTest -@TruffleTests class FunctionPackageTruffleTest extends TruffleCompilerTestContext with FunctionPackageTest -@TruffleTests class HttpPackageTruffleTest extends TruffleCompilerTestContext with HttpPackageTest -@TruffleTests class IntervalPackageTruffleTest extends TruffleCompilerTestContext with IntervalPackageTest -@TruffleTests class IntPackageTruffleTest extends TruffleCompilerTestContext with IntPackageTest -@TruffleTests class JsonPackageTruffleTest extends TruffleCompilerTestContext with JsonPackageTest -@TruffleTests class LongPackageTruffleTest extends TruffleCompilerTestContext with LongPackageTest -@TruffleTests class MathPackageTruffleTest extends TruffleCompilerTestContext with MathPackageTest -@TruffleTests class NullablePackageTruffleTest extends TruffleCompilerTestContext with NullablePackageTest -@TruffleTests class NullableTryablePackageTruffleTest extends TruffleCompilerTestContext with NullableTryablePackageTest -@TruffleTests class RecordPackageTruffleTest extends TruffleCompilerTestContext with RecordPackageTest -@TruffleTests class RegexPackageTruffleTest extends TruffleCompilerTestContext with RegexPackageTest -@TruffleTests class S3PackageTruffleTest extends TruffleCompilerTestContext with S3PackageTest -@TruffleTests class ShortPackageTruffleTest extends TruffleCompilerTestContext with ShortPackageTest -@TruffleTests class StringPackageTruffleTest extends TruffleCompilerTestContext with StringPackageTest -@TruffleTests class SuccessPackageTruffleTest extends TruffleCompilerTestContext with SuccessPackageTest -@TruffleTests class TimePackageTruffleTest extends TruffleCompilerTestContext with TimePackageTest -@TruffleTests class TimestampPackageTruffleTest extends TruffleCompilerTestContext with TimestampPackageTest -@TruffleTests class TryPackageTruffleTest extends TruffleCompilerTestContext with TryPackageTest -@TruffleTests class TypePackageTruffleTest extends TruffleCompilerTestContext with TypePackageTest -@TruffleTests class XmlPackageTruffleTest extends TruffleCompilerTestContext with XmlPackageTest -@TruffleTests class LocationPackageTruffleTest extends TruffleCompilerTestContext with LocationPackageTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/builtin/collection/TruffleCollectionTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/builtin/collection/TruffleCollectionTest.scala deleted file mode 100644 index 0440a9afd..000000000 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/builtin/collection/TruffleCollectionTest.scala +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.compiler.rql2.tests.builtin.collection - -import raw.compiler.rql2.truffle.TruffleCompilerTestContext -import raw.testing.tags.TruffleTests - -@TruffleTests class CollectionDistinctTruffleTest extends TruffleCompilerTestContext with CollectionDistinctTest - -@TruffleTests class CollectionExplodeTruffleTest extends TruffleCompilerTestContext with CollectionExplodeTest - -@TruffleTests class CollectionGroupByTruffleTest extends TruffleCompilerTestContext with CollectionGroupByTest - -@TruffleTests class CollectionJoinTruffleTest extends TruffleCompilerTestContext with CollectionJoinTest -@TruffleTests class CollectionMinMaxTruffleTest extends TruffleCompilerTestContext with CollectionMinMaxTest -@TruffleTests class CollectionMkStringTruffleTest extends TruffleCompilerTestContext with CollectionMkStringTest - -@TruffleTests class CollectionOrderByTruffleTest extends TruffleCompilerTestContext with CollectionOrderByTest - -@TruffleTests class CollectionPackageTruffleTest extends TruffleCompilerTestContext with CollectionPackageTest - -@TruffleTests class CollectionRangeTruffleTest extends TruffleCompilerTestContext with CollectionRangeTest -@TruffleTests class CollectionUnionTruffleTest extends TruffleCompilerTestContext with CollectionUnionTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/builtin/list/TruffleListTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/builtin/list/TruffleListTest.scala deleted file mode 100644 index 9d0a072a9..000000000 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/builtin/list/TruffleListTest.scala +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.compiler.rql2.tests.builtin.list - -import raw.compiler.rql2.truffle.TruffleCompilerTestContext -import raw.testing.tags.TruffleTests - -@TruffleTests class ListDistinctTruffleTest extends TruffleCompilerTestContext with ListDistinctTest - -@TruffleTests class ListExplodeTruffleTest extends TruffleCompilerTestContext with ListExplodeTest - -@TruffleTests class ListGroupByTruffleTest extends TruffleCompilerTestContext with ListGroupByTest -@TruffleTests class ListJoinTruffleTest extends TruffleCompilerTestContext with ListJoinTest -@TruffleTests class ListMinMaxTruffleTest extends TruffleCompilerTestContext with ListMinMaxTest -@TruffleTests class ListMkStringTruffleTest extends TruffleCompilerTestContext with ListMkStringTest -@TruffleTests class ListOrderByTruffleTest extends TruffleCompilerTestContext with ListOrderByTest -@TruffleTests class ListPackageTruffleTest extends TruffleCompilerTestContext with ListPackageTest -@TruffleTests class ListUnionTruffleTest extends TruffleCompilerTestContext with ListUnionTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/lsp/TruffleLspTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/lsp/TruffleLspTest.scala deleted file mode 100644 index f1b70241b..000000000 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/lsp/TruffleLspTest.scala +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.compiler.rql2.tests.lsp - -import raw.compiler.rql2.truffle.TruffleCompilerTestContext -import raw.testing.tags.TruffleTests - -@TruffleTests class LspBrokenCodeTruffleTest extends TruffleCompilerTestContext with LspBrokenCodeTest -@TruffleTests class LspCommentsFormatTruffleTest extends TruffleCompilerTestContext with LspCommentsFormatTest -@TruffleTests class LspDefinitionTruffleTest extends TruffleCompilerTestContext with LspDefinitionTest -@TruffleTests class LspDotAutoCompleteTruffleTest extends TruffleCompilerTestContext with LspDotAutoCompleteTest -@TruffleTests class LspFormatCodeTruffleTest extends TruffleCompilerTestContext with LspFormatCodeTest -@TruffleTests class LspHoverTruffleTest extends TruffleCompilerTestContext with LspHoverTest -@TruffleTests class LspRenameTruffleTest extends TruffleCompilerTestContext with LspRenameTest -@TruffleTests class LspValidateTruffleTest extends TruffleCompilerTestContext with LspValidateTest -@TruffleTests class LspWordAutoCompleteTruffleTest extends TruffleCompilerTestContext with LspWordAutoCompleteTest -@TruffleTests class LspCompilationMessagesTruffleTest extends TruffleCompilerTestContext with LspCompilationMessagesTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/offheap/TruffleOffHeapTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/offheap/TruffleOffHeapTest.scala deleted file mode 100644 index 169b7e4c9..000000000 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/offheap/TruffleOffHeapTest.scala +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.compiler.rql2.tests.offheap - -import raw.compiler.rql2.truffle.TruffleCompilerTestContext -import raw.testing.tags.TruffleTests - -@TruffleTests class OffHeapDistinctTruffleTest extends TruffleCompilerTestContext with OffHeapDistinctTest -@TruffleTests class OffHeapEquiJoinTruffleTest extends TruffleCompilerTestContext with OffHeapEquiJoinTest -@TruffleTests class OffHeapGroupTruffleTest extends TruffleCompilerTestContext with OffHeapGroupTest -@TruffleTests class OffHeapJoinTruffleTest extends TruffleCompilerTestContext with OffHeapJoinTest -@TruffleTests class OffHeapOrderByTruffleTest extends TruffleCompilerTestContext with OffHeapOrderByTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/output/TruffleOutputTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/output/TruffleOutputTest.scala deleted file mode 100644 index ad066e00a..000000000 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/output/TruffleOutputTest.scala +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.compiler.rql2.tests.output - -import raw.compiler.rql2.truffle.TruffleCompilerTestContext -import raw.testing.tags.TruffleTests - -@TruffleTests class BinaryOutputTruffleTest extends TruffleCompilerTestContext with BinaryOutputTest -@TruffleTests class TextOutputTruffleTest extends TruffleCompilerTestContext with TextOutputTest -@TruffleTests class CsvOutputTruffleTest extends TruffleCompilerTestContext with CsvOutputTest -@TruffleTests class JsonOutputTruffleTest extends TruffleCompilerTestContext with JsonOutputTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/parser/TruffleParserTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/parser/TruffleParserTest.scala deleted file mode 100644 index f6ae02d37..000000000 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/parser/TruffleParserTest.scala +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.compiler.rql2.tests.parser - -import raw.compiler.rql2.truffle.TruffleCompilerTestContext -import raw.testing.tags.TruffleTests - -@TruffleTests class FrontendSyntaxAnalyzerTruffleTest extends TruffleCompilerTestContext with FrontendSyntaxAnalyzerTest -@TruffleTests class ListSugarTruffleTest extends TruffleCompilerTestContext with ListSugarTest -@TruffleTests class OperatorPrecedenceTruffleTest extends TruffleCompilerTestContext with OperatorPrecedenceTest -@TruffleTests class RecordSugarTruffleTest extends TruffleCompilerTestContext with RecordSugarTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/regressions/TruffleRegressionTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/regressions/TruffleRegressionTest.scala deleted file mode 100644 index 89aa8c202..000000000 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/regressions/TruffleRegressionTest.scala +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.compiler.rql2.tests.regressions - -import raw.compiler.rql2.truffle.TruffleCompilerTestContext -import raw.testing.tags.TruffleTests - -@TruffleTests class RD9932TruffleTest extends TruffleCompilerTestContext with RD9932Test -@TruffleTests class RD9485TruffleTest extends TruffleCompilerTestContext with RD9485Test -@TruffleTests class RD9445TruffleTest extends TruffleCompilerTestContext with RD9445Test -@TruffleTests class RD5797TruffleTest extends TruffleCompilerTestContext with RD5797Test -@TruffleTests class RD5779TruffleTest extends TruffleCompilerTestContext with RD5779Test -@TruffleTests class RD5393TruffleTest extends TruffleCompilerTestContext with RD5393Test -@TruffleTests class RD5884TruffleTest extends TruffleCompilerTestContext with RD5884Test -@TruffleTests class RD5448TruffleTest extends TruffleCompilerTestContext with RD5448Test -@TruffleTests class RD5238TruffleTest extends TruffleCompilerTestContext with RD5238Test -@TruffleTests class RD3742TruffleTest extends TruffleCompilerTestContext with RD3742Test -@TruffleTests class RD3784TruffleTest extends TruffleCompilerTestContext with RD3784Test -@TruffleTests class RD5784TruffleTest extends TruffleCompilerTestContext with RD5784Test -@TruffleTests class RD4981TruffleTest extends TruffleCompilerTestContext with RD4981Test -@TruffleTests class RD5920TruffleTest extends TruffleCompilerTestContext with RD5920Test -@TruffleTests class RD572TruffleTest extends TruffleCompilerTestContext with RD572Test -@TruffleTests class RD5785TruffleTest extends TruffleCompilerTestContext with RD5785Test -@TruffleTests class RD5491TruffleTest extends TruffleCompilerTestContext with RD5491Test -@TruffleTests class RD7974TruffleTest extends TruffleCompilerTestContext with RD7974Test -@TruffleTests class RD5714TruffleTest extends TruffleCompilerTestContext with RD5714Test -@TruffleTests class RD5697TruffleTest extends TruffleCompilerTestContext with RD5697Test -@TruffleTests class RD5644TruffleTest extends TruffleCompilerTestContext with RD5644Test -@TruffleTests class RD8993TruffleTest extends TruffleCompilerTestContext with RD8993Test -@TruffleTests class RD4529TruffleTest extends TruffleCompilerTestContext with RD4529Test -@TruffleTests class RD5893TruffleTest extends TruffleCompilerTestContext with RD5893Test -@TruffleTests class RD8764TruffleTest extends TruffleCompilerTestContext with RD8764Test -@TruffleTests class RD5979TruffleTest extends TruffleCompilerTestContext with RD5979Test -@TruffleTests class RD5679TruffleTest extends TruffleCompilerTestContext with RD5679Test -@TruffleTests class RD5775TruffleTest extends TruffleCompilerTestContext with RD5775Test -@TruffleTests class RD5851TruffleTest extends TruffleCompilerTestContext with RD5851Test -@TruffleTests class RD5412TruffleTest extends TruffleCompilerTestContext with RD5412Test -@TruffleTests class RD5971TruffleTest extends TruffleCompilerTestContext with RD5971Test -@TruffleTests class RD5968TruffleTest extends TruffleCompilerTestContext with RD5968Test -@TruffleTests class RD5691TruffleTest extends TruffleCompilerTestContext with RD5691Test -@TruffleTests class RD8935TruffleTest extends TruffleCompilerTestContext with RD8935Test -@TruffleTests class RD7924TruffleTest extends TruffleCompilerTestContext with RD7924Test -@TruffleTests class RD5488TruffleTest extends TruffleCompilerTestContext with RD5488Test -@TruffleTests class RD5786TruffleTest extends TruffleCompilerTestContext with RD5786Test -@TruffleTests class RD5722TruffleTest extends TruffleCompilerTestContext with RD5722Test -@TruffleTests class RD5925TruffleTest extends TruffleCompilerTestContext with RD5925Test -@TruffleTests class RD5921TruffleTest extends TruffleCompilerTestContext with RD5921Test -@TruffleTests class RD5932TruffleTest extends TruffleCompilerTestContext with RD5932Test -@TruffleTests class RD5484TruffleTest extends TruffleCompilerTestContext with RD5484Test -@TruffleTests class RD8530TruffleTest extends TruffleCompilerTestContext with RD8530Test -@TruffleTests class RD5685TruffleTest extends TruffleCompilerTestContext with RD5685Test -@TruffleTests class RD5365TruffleTest extends TruffleCompilerTestContext with RD5365Test -@TruffleTests class RD5914TruffleTest extends TruffleCompilerTestContext with RD5914Test -@TruffleTests class RD9137TruffleTest extends TruffleCompilerTestContext with RD9137Test -@TruffleTests class RD9228TruffleTest extends TruffleCompilerTestContext with RD9228Test -@TruffleTests class RD9359TruffleTest extends TruffleCompilerTestContext with RD9359Test -@TruffleTests class RD9255TruffleTest extends TruffleCompilerTestContext with RD9255Test -@TruffleTests class RD9229TruffleTest extends TruffleCompilerTestContext with RD9229Test -@TruffleTests class RD9409TruffleTest extends TruffleCompilerTestContext with RD9409Test -@TruffleTests class RD9479TruffleTest extends TruffleCompilerTestContext with RD9479Test -@TruffleTests class RD9554TruffleTest extends TruffleCompilerTestContext with RD9554Test -@TruffleTests class RD9616TruffleTest extends TruffleCompilerTestContext with RD9616Test -@TruffleTests class RD10194TruffleTest extends TruffleCompilerTestContext with RD10194Test -@TruffleTests class RD10220TruffleTest extends TruffleCompilerTestContext with RD10220Test -@TruffleTests class RD10723TruffleTest extends TruffleCompilerTestContext with RD10723Test -@TruffleTests class RD10801TruffleTest extends TruffleCompilerTestContext with RD10801Test diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/spec/TruffleSpecTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/spec/TruffleSpecTest.scala deleted file mode 100644 index 6a838336b..000000000 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/spec/TruffleSpecTest.scala +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.compiler.rql2.tests.truffle.spec - -import raw.compiler.rql2.tests.spec._ -import raw.compiler.rql2.truffle.TruffleCompilerTestContext -import raw.testing.tags.TruffleTests - -@TruffleTests class PropagationTruffleTest extends TruffleCompilerTestContext with PropagationTest -@TruffleTests class JoinWithTryRowsTruffleTest extends TruffleCompilerTestContext with JoinWithTryRowsTest -@TruffleTests class ConstTruffleTest extends TruffleCompilerTestContext with ConstTest -@TruffleTests class BinaryExpLeTruffleTest extends TruffleCompilerTestContext with BinaryExpLeTest -@TruffleTests class BinaryExpAndTruffleTest extends TruffleCompilerTestContext with BinaryExpAndTest -@TruffleTests class UnaryExpNotTruffleTest extends TruffleCompilerTestContext with UnaryExpNotTest -@TruffleTests class ProjTruffleTest extends TruffleCompilerTestContext with ProjTest -@TruffleTests class ErrorsTruffleTest extends TruffleCompilerTestContext with ErrorsTest - -@TruffleTests class IfThenElseTruffleTest extends TruffleCompilerTestContext with IfThenElseTest -@TruffleTests class BinaryExpGtTruffleTest extends TruffleCompilerTestContext with BinaryExpGtTest -@TruffleTests class BinaryExpMultTruffleTest extends TruffleCompilerTestContext with BinaryExpMultTest -@TruffleTests class BinaryExpGeTruffleTest extends TruffleCompilerTestContext with BinaryExpGeTest -@TruffleTests class UnaryExpNegTruffleTest extends TruffleCompilerTestContext with UnaryExpNegTest -@TruffleTests class BinaryExpDivTruffleTest extends TruffleCompilerTestContext with BinaryExpDivTest -@TruffleTests class MigrationTruffleTest extends TruffleCompilerTestContext with MigrationTest - -@TruffleTests class LetBindTruffleTest extends TruffleCompilerTestContext with LetBindTest -@TruffleTests class FunAbsTruffleTest extends TruffleCompilerTestContext with FunAbsTest - -@TruffleTests class LetFunRecTruffleTest extends TruffleCompilerTestContext with LetFunRecTest -@TruffleTests class ClosureTruffleTest extends TruffleCompilerTestContext with ClosureTest -@TruffleTests class BinaryExpOrTruffleTest extends TruffleCompilerTestContext with BinaryExpOrTest -@TruffleTests class BinaryExpEqTruffleTest extends TruffleCompilerTestContext with BinaryExpEqTest -@TruffleTests class BinaryExpNeqTruffleTest extends TruffleCompilerTestContext with BinaryExpNeqTest -@TruffleTests class ImplicitCastTruffleTest extends TruffleCompilerTestContext with ImplicitCastTest -@TruffleTests class BinaryExpModTruffleTest extends TruffleCompilerTestContext with BinaryExpModTest -@TruffleTests class BinaryExpSubTruffleTest extends TruffleCompilerTestContext with BinaryExpSubTest -@TruffleTests class LetTypeTruffleTest extends TruffleCompilerTestContext with LetTypeTest -@TruffleTests class BinaryExpPlusTruffleTest extends TruffleCompilerTestContext with BinaryExpPlusTest -@TruffleTests class BasicStagedCompilerTruffleTest extends TruffleCompilerTestContext with BasicStagedCompilerTest -@TruffleTests class BinaryExpLtTruffleTest extends TruffleCompilerTestContext with BinaryExpLtTest -@TruffleTests class PackageNameTruffleTest extends TruffleCompilerTestContext with PackageNameTest - -@TruffleTests class StagedCompilerTruffleTest extends TruffleCompilerTestContext with StagedCompilerTest - -@TruffleTests class LetFunTruffleTest extends TruffleCompilerTestContext with LetFunTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/Rql2TruffleCompilerServiceTestContext.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/Rql2TruffleCompilerServiceTestContext.scala index a79921ebb..53b8e3cda 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/Rql2TruffleCompilerServiceTestContext.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/Rql2TruffleCompilerServiceTestContext.scala @@ -27,10 +27,12 @@ trait Rql2TruffleCompilerServiceTestContext extends Rql2CompilerServiceTestConte override def beforeAll(): Unit = { super.beforeAll() + property("raw.compiler.impl", "rql2-truffle") + // Create an isolated Truffle Engine val options = new java.util.HashMap[String, String]() - options.put("rql.settings", settings.renderAsString) -// //diagnostics + + // Diagnostics-related settings // options.put("engine.CompilationStatistics", "true") // // options.put("engine.CompilationStatisticDetails", "true") // // options.put("compiler.InstrumentBoundaries", "true") @@ -43,12 +45,12 @@ trait Rql2TruffleCompilerServiceTestContext extends Rql2CompilerServiceTestConte // options.put("engine.TraceCompilationPolymorphism", "true") // options.put("engine.TraceSplittingSummary", "true") // // options.put("engine.TraceCompilationDetails", "true") -//// options.put("engine.CompileImmediately", "true") +// // options.put("engine.CompileImmediately", "true") // options.put("engine.BackgroundCompilation", "false") - // options.put("engine.SpecializationStatistics", "false") +// options.put("engine.SpecializationStatistics", "false") // options.put("engine.OSR", "false") -// // optimizations + // Optimizations-related settings // options.put("compiler.InlineAcrossTruffleBoundary", "true") // options.put("engine.CompilerThreads", "24") // options.put("engine.FirstTierCompilationThreshold", "100") @@ -64,8 +66,8 @@ trait Rql2TruffleCompilerServiceTestContext extends Rql2CompilerServiceTestConte // options.put("engine.Splitting", "false") // options.put("compiler.FirstTierUseEconomy", "false") // options.put("compiler.InliningExpansionBudget", "20000") - // options.put("compiler.InliningInliningBudget", "20000") - // options.put("compiler.InliningRecursionDepth", "10") +// options.put("compiler.InliningInliningBudget", "20000") +// options.put("compiler.InliningRecursionDepth", "10") // options.put("engine.IsolateMemoryProtection", "false") engine = Engine @@ -74,8 +76,6 @@ trait Rql2TruffleCompilerServiceTestContext extends Rql2CompilerServiceTestConte .options(options) .build() - property("raw.compiler.impl", "rql2-truffle") - rql2TruffleCompilerService = new Rql2TruffleCompilerService((engine, false), None) setCompilerService(rql2TruffleCompilerService) } diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/TruffleCompilerTestContext.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/TruffleWithLocalCredentialsTestContext.scala similarity index 60% rename from snapi-client/src/test/scala/raw/compiler/rql2/truffle/TruffleCompilerTestContext.scala rename to snapi-client/src/test/scala/raw/compiler/rql2/truffle/TruffleWithLocalCredentialsTestContext.scala index 17632a9c3..c434ee979 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/TruffleCompilerTestContext.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/TruffleWithLocalCredentialsTestContext.scala @@ -12,10 +12,12 @@ package raw.compiler.rql2.truffle -import raw.compiler.rql2.api.Rql2OutputTestContext -import raw.compiler.rql2.tests.CompilerTestContext +import raw.compiler.rql2.tests.Rql2CompilerTestContext +import raw.creds.api.CredentialsTestContext +import raw.creds.local.LocalCredentialsTestContext -class TruffleCompilerTestContext - extends CompilerTestContext - with Rql2OutputTestContext +trait TruffleWithLocalCredentialsTestContext + extends Rql2CompilerTestContext + with LocalCredentialsTestContext + with CredentialsTestContext with Rql2TruffleCompilerServiceTestContext diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/benchmark/TruffleBenchmarkTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/benchmark/TruffleBenchmarkTest.scala similarity index 52% rename from snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/benchmark/TruffleBenchmarkTest.scala rename to snapi-client/src/test/scala/raw/compiler/rql2/truffle/benchmark/TruffleBenchmarkTest.scala index 8617324b1..78dc43859 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/benchmark/TruffleBenchmarkTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/benchmark/TruffleBenchmarkTest.scala @@ -10,11 +10,12 @@ * licenses/APL.txt. */ -package raw.compiler.rql2.tests.benchmark +package raw.compiler.rql2.truffle.benchmark -import raw.compiler.rql2.truffle.TruffleCompilerTestContext +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext import raw.testing.tags.TruffleTests +import raw.compiler.rql2.tests.benchmark._ -@TruffleTests class BenchmarkTruffleTests extends TruffleCompilerTestContext with BenchmarkTests +@TruffleTests class BenchmarkTruffleTests extends TruffleWithLocalCredentialsTestContext with BenchmarkTests -@TruffleTests class StressTruffleTests extends TruffleCompilerTestContext with StressTests +@TruffleTests class StressTruffleTests extends TruffleWithLocalCredentialsTestContext with StressTests diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/builtin/TruffleBuiltInTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/builtin/TruffleBuiltInTest.scala new file mode 100644 index 000000000..7f72a2b79 --- /dev/null +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/builtin/TruffleBuiltInTest.scala @@ -0,0 +1,52 @@ +/* + * Copyright 2023 RAW Labs S.A. + * + * Use of this software is governed by the Business Source License + * included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with + * the Business Source License, use of this software will be governed + * by the Apache License, Version 2.0, included in the file + * licenses/APL.txt. + */ + +package raw.compiler.rql2.truffle.builtin + +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext +import raw.testing.tags.TruffleTests +import raw.compiler.rql2.tests.builtin._ + +@TruffleTests class BinaryPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryPackageTest +@TruffleTests class BytePackageTruffleTest extends TruffleWithLocalCredentialsTestContext with BytePackageTest +@TruffleTests class CsvPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with CsvPackageTest +@TruffleTests class DatePackageTruffleTest extends TruffleWithLocalCredentialsTestContext with DatePackageTest +@TruffleTests class DecimalPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with DecimalPackageTest +@TruffleTests class DoublePackageTruffleTest extends TruffleWithLocalCredentialsTestContext with DoublePackageTest +@TruffleTests class EnvironmentPackageTruffleTest + extends TruffleWithLocalCredentialsTestContext + with EnvironmentPackageTest +@TruffleTests class ErrorPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with ErrorPackageTest +@TruffleTests class FloatPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with FloatPackageTest +@TruffleTests class FunctionPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with FunctionPackageTest +@TruffleTests class HttpPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with HttpPackageTest +@TruffleTests class IntervalPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with IntervalPackageTest +@TruffleTests class IntPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with IntPackageTest +@TruffleTests class JsonPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with JsonPackageTest +@TruffleTests class LongPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with LongPackageTest +@TruffleTests class MathPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with MathPackageTest +@TruffleTests class NullablePackageTruffleTest extends TruffleWithLocalCredentialsTestContext with NullablePackageTest +@TruffleTests class NullableTryablePackageTruffleTest + extends TruffleWithLocalCredentialsTestContext + with NullableTryablePackageTest +@TruffleTests class RecordPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with RecordPackageTest +@TruffleTests class RegexPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with RegexPackageTest +@TruffleTests class S3PackageTruffleTest extends TruffleWithLocalCredentialsTestContext with S3PackageTest +@TruffleTests class ShortPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with ShortPackageTest +@TruffleTests class StringPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with StringPackageTest +@TruffleTests class SuccessPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with SuccessPackageTest +@TruffleTests class TimePackageTruffleTest extends TruffleWithLocalCredentialsTestContext with TimePackageTest +@TruffleTests class TimestampPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with TimestampPackageTest +@TruffleTests class TryPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with TryPackageTest +@TruffleTests class TypePackageTruffleTest extends TruffleWithLocalCredentialsTestContext with TypePackageTest +@TruffleTests class XmlPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with XmlPackageTest +@TruffleTests class LocationPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with LocationPackageTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/builtin/collection/TruffleCollectionTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/builtin/collection/TruffleCollectionTest.scala new file mode 100644 index 000000000..a79959abe --- /dev/null +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/builtin/collection/TruffleCollectionTest.scala @@ -0,0 +1,46 @@ +/* + * Copyright 2023 RAW Labs S.A. + * + * Use of this software is governed by the Business Source License + * included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with + * the Business Source License, use of this software will be governed + * by the Apache License, Version 2.0, included in the file + * licenses/APL.txt. + */ + +package raw.compiler.rql2.truffle.builtin.collection + +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext +import raw.testing.tags.TruffleTests +import raw.compiler.rql2.tests.builtin.collection._ + +@TruffleTests class CollectionDistinctTruffleTest + extends TruffleWithLocalCredentialsTestContext + with CollectionDistinctTest + +@TruffleTests class CollectionExplodeTruffleTest + extends TruffleWithLocalCredentialsTestContext + with CollectionExplodeTest + +@TruffleTests class CollectionGroupByTruffleTest + extends TruffleWithLocalCredentialsTestContext + with CollectionGroupByTest + +@TruffleTests class CollectionJoinTruffleTest extends TruffleWithLocalCredentialsTestContext with CollectionJoinTest +@TruffleTests class CollectionMinMaxTruffleTest extends TruffleWithLocalCredentialsTestContext with CollectionMinMaxTest +@TruffleTests class CollectionMkStringTruffleTest + extends TruffleWithLocalCredentialsTestContext + with CollectionMkStringTest + +@TruffleTests class CollectionOrderByTruffleTest + extends TruffleWithLocalCredentialsTestContext + with CollectionOrderByTest + +@TruffleTests class CollectionPackageTruffleTest + extends TruffleWithLocalCredentialsTestContext + with CollectionPackageTest + +@TruffleTests class CollectionRangeTruffleTest extends TruffleWithLocalCredentialsTestContext with CollectionRangeTest +@TruffleTests class CollectionUnionTruffleTest extends TruffleWithLocalCredentialsTestContext with CollectionUnionTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/builtin/list/TruffleListTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/builtin/list/TruffleListTest.scala new file mode 100644 index 000000000..fb3faee80 --- /dev/null +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/builtin/list/TruffleListTest.scala @@ -0,0 +1,29 @@ +/* + * Copyright 2023 RAW Labs S.A. + * + * Use of this software is governed by the Business Source License + * included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with + * the Business Source License, use of this software will be governed + * by the Apache License, Version 2.0, included in the file + * licenses/APL.txt. + */ + +package raw.compiler.rql2.truffle.builtin.list + +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext +import raw.testing.tags.TruffleTests +import raw.compiler.rql2.tests.builtin.list._ + +@TruffleTests class ListDistinctTruffleTest extends TruffleWithLocalCredentialsTestContext with ListDistinctTest + +@TruffleTests class ListExplodeTruffleTest extends TruffleWithLocalCredentialsTestContext with ListExplodeTest + +@TruffleTests class ListGroupByTruffleTest extends TruffleWithLocalCredentialsTestContext with ListGroupByTest +@TruffleTests class ListJoinTruffleTest extends TruffleWithLocalCredentialsTestContext with ListJoinTest +@TruffleTests class ListMinMaxTruffleTest extends TruffleWithLocalCredentialsTestContext with ListMinMaxTest +@TruffleTests class ListMkStringTruffleTest extends TruffleWithLocalCredentialsTestContext with ListMkStringTest +@TruffleTests class ListOrderByTruffleTest extends TruffleWithLocalCredentialsTestContext with ListOrderByTest +@TruffleTests class ListPackageTruffleTest extends TruffleWithLocalCredentialsTestContext with ListPackageTest +@TruffleTests class ListUnionTruffleTest extends TruffleWithLocalCredentialsTestContext with ListUnionTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/hints/TruffleHintsTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/hints/TruffleHintsTest.scala similarity index 58% rename from snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/hints/TruffleHintsTest.scala rename to snapi-client/src/test/scala/raw/compiler/rql2/truffle/hints/TruffleHintsTest.scala index 680dbad91..b316cfea1 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/hints/TruffleHintsTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/hints/TruffleHintsTest.scala @@ -10,9 +10,12 @@ * licenses/APL.txt. */ -package raw.compiler.rql2.tests.hints +package raw.compiler.rql2.truffle.hints -import raw.compiler.rql2.truffle.TruffleCompilerTestContext +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext import raw.testing.tags.TruffleTests +import raw.compiler.rql2.tests.hints._ -@TruffleTests class SemanticAnalyzerHintsTruffleTest extends TruffleCompilerTestContext with SemanticAnalyzerHintsTest +@TruffleTests class SemanticAnalyzerHintsTruffleTest + extends TruffleWithLocalCredentialsTestContext + with SemanticAnalyzerHintsTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/lsp/TruffleLspTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/lsp/TruffleLspTest.scala new file mode 100644 index 000000000..b6985069d --- /dev/null +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/lsp/TruffleLspTest.scala @@ -0,0 +1,36 @@ +/* + * Copyright 2023 RAW Labs S.A. + * + * Use of this software is governed by the Business Source License + * included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with + * the Business Source License, use of this software will be governed + * by the Apache License, Version 2.0, included in the file + * licenses/APL.txt. + */ + +package raw.compiler.rql2.truffle.lsp + +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext +import raw.testing.tags.TruffleTests +import raw.compiler.rql2.tests.lsp._ + +@TruffleTests class LspBrokenCodeTruffleTest extends TruffleWithLocalCredentialsTestContext with LspBrokenCodeTest +@TruffleTests class LspCommentsFormatTruffleTest + extends TruffleWithLocalCredentialsTestContext + with LspCommentsFormatTest +@TruffleTests class LspDefinitionTruffleTest extends TruffleWithLocalCredentialsTestContext with LspDefinitionTest +@TruffleTests class LspDotAutoCompleteTruffleTest + extends TruffleWithLocalCredentialsTestContext + with LspDotAutoCompleteTest +@TruffleTests class LspFormatCodeTruffleTest extends TruffleWithLocalCredentialsTestContext with LspFormatCodeTest +@TruffleTests class LspHoverTruffleTest extends TruffleWithLocalCredentialsTestContext with LspHoverTest +@TruffleTests class LspRenameTruffleTest extends TruffleWithLocalCredentialsTestContext with LspRenameTest +@TruffleTests class LspValidateTruffleTest extends TruffleWithLocalCredentialsTestContext with LspValidateTest +@TruffleTests class LspWordAutoCompleteTruffleTest + extends TruffleWithLocalCredentialsTestContext + with LspWordAutoCompleteTest +@TruffleTests class LspCompilationMessagesTruffleTest + extends TruffleWithLocalCredentialsTestContext + with LspCompilationMessagesTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/offheap/KryoPackageTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/offheap/KryoPackageTest.scala similarity index 93% rename from snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/offheap/KryoPackageTest.scala rename to snapi-client/src/test/scala/raw/compiler/rql2/truffle/offheap/KryoPackageTest.scala index faf876152..8166879a6 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/offheap/KryoPackageTest.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/offheap/KryoPackageTest.scala @@ -10,14 +10,14 @@ * licenses/APL.txt. */ -package raw.compiler.rql2.tests.offheap +package raw.compiler.rql2.truffle.offheap import org.scalatest.prop.TableDrivenPropertyChecks -import raw.compiler.rql2.truffle.TruffleCompilerTestContext +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext import raw.testing.tags.TruffleTests @TruffleTests -class KryoPackageTest extends TruffleCompilerTestContext with TableDrivenPropertyChecks { +class KryoPackageTest extends TruffleWithLocalCredentialsTestContext with TableDrivenPropertyChecks { private val cases = Table( ("value", "type"), diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/offheap/TruffleOffHeapTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/offheap/TruffleOffHeapTest.scala new file mode 100644 index 000000000..79cae32cc --- /dev/null +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/offheap/TruffleOffHeapTest.scala @@ -0,0 +1,23 @@ +/* + * Copyright 2023 RAW Labs S.A. + * + * Use of this software is governed by the Business Source License + * included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with + * the Business Source License, use of this software will be governed + * by the Apache License, Version 2.0, included in the file + * licenses/APL.txt. + */ + +package raw.compiler.rql2.truffle.offheap + +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext +import raw.testing.tags.TruffleTests +import raw.compiler.rql2.tests.offheap._ + +@TruffleTests class OffHeapDistinctTruffleTest extends TruffleWithLocalCredentialsTestContext with OffHeapDistinctTest +@TruffleTests class OffHeapEquiJoinTruffleTest extends TruffleWithLocalCredentialsTestContext with OffHeapEquiJoinTest +@TruffleTests class OffHeapGroupTruffleTest extends TruffleWithLocalCredentialsTestContext with OffHeapGroupTest +@TruffleTests class OffHeapJoinTruffleTest extends TruffleWithLocalCredentialsTestContext with OffHeapJoinTest +@TruffleTests class OffHeapOrderByTruffleTest extends TruffleWithLocalCredentialsTestContext with OffHeapOrderByTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/output/TruffleOutputTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/output/TruffleOutputTest.scala new file mode 100644 index 000000000..f76a2a33c --- /dev/null +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/output/TruffleOutputTest.scala @@ -0,0 +1,22 @@ +/* + * Copyright 2023 RAW Labs S.A. + * + * Use of this software is governed by the Business Source License + * included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with + * the Business Source License, use of this software will be governed + * by the Apache License, Version 2.0, included in the file + * licenses/APL.txt. + */ + +package raw.compiler.rql2.truffle.output + +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext +import raw.testing.tags.TruffleTests +import raw.compiler.rql2.tests.output._ + +@TruffleTests class BinaryOutputTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryOutputTest +@TruffleTests class TextOutputTruffleTest extends TruffleWithLocalCredentialsTestContext with TextOutputTest +@TruffleTests class CsvOutputTruffleTest extends TruffleWithLocalCredentialsTestContext with CsvOutputTest +@TruffleTests class JsonOutputTruffleTest extends TruffleWithLocalCredentialsTestContext with JsonOutputTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/parser/TruffleParserTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/parser/TruffleParserTest.scala new file mode 100644 index 000000000..e7563f6ae --- /dev/null +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/parser/TruffleParserTest.scala @@ -0,0 +1,26 @@ +/* + * Copyright 2023 RAW Labs S.A. + * + * Use of this software is governed by the Business Source License + * included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with + * the Business Source License, use of this software will be governed + * by the Apache License, Version 2.0, included in the file + * licenses/APL.txt. + */ + +package raw.compiler.rql2.truffle.parser + +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext +import raw.testing.tags.TruffleTests +import raw.compiler.rql2.tests.parser._ + +@TruffleTests class FrontendSyntaxAnalyzerTruffleTest + extends TruffleWithLocalCredentialsTestContext + with FrontendSyntaxAnalyzerTest +@TruffleTests class ListSugarTruffleTest extends TruffleWithLocalCredentialsTestContext with ListSugarTest +@TruffleTests class OperatorPrecedenceTruffleTest + extends TruffleWithLocalCredentialsTestContext + with OperatorPrecedenceTest +@TruffleTests class RecordSugarTruffleTest extends TruffleWithLocalCredentialsTestContext with RecordSugarTest diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/regressions/RD10767Test.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/regressions/RD10767Test.scala similarity index 90% rename from snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/regressions/RD10767Test.scala rename to snapi-client/src/test/scala/raw/compiler/rql2/truffle/regressions/RD10767Test.scala index 4eacb6eef..1c93d282a 100644 --- a/snapi-client/src/test/scala/raw/compiler/rql2/tests/truffle/regressions/RD10767Test.scala +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/regressions/RD10767Test.scala @@ -10,13 +10,13 @@ * licenses/APL.txt. */ -package raw.compiler.rql2.tests.truffle.regressions +package raw.compiler.rql2.truffle.truffle.regressions import raw.client.api.{GetProgramDescriptionSuccess, ProgramEnvironment} -import raw.compiler.rql2.truffle.TruffleCompilerTestContext +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext import raw.compiler.utils.SnapiInterpolator -class RD10767Test extends TruffleCompilerTestContext { +class RD10767Test extends TruffleWithLocalCredentialsTestContext { private val data = tempFile(""" |[ | {"a": 1, "b": 10, "c": 100}, diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/regressions/TruffleRegressionTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/regressions/TruffleRegressionTest.scala new file mode 100644 index 000000000..111d04e15 --- /dev/null +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/regressions/TruffleRegressionTest.scala @@ -0,0 +1,77 @@ +/* + * Copyright 2023 RAW Labs S.A. + * + * Use of this software is governed by the Business Source License + * included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with + * the Business Source License, use of this software will be governed + * by the Apache License, Version 2.0, included in the file + * licenses/APL.txt. + */ + +package raw.compiler.rql2.truffle.regressions + +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext +import raw.testing.tags.TruffleTests +import raw.compiler.rql2.tests.regressions._ + +@TruffleTests class RD9932TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9932Test +@TruffleTests class RD9485TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9485Test +@TruffleTests class RD9445TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9445Test +@TruffleTests class RD5797TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5797Test +@TruffleTests class RD5779TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5779Test +@TruffleTests class RD5393TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5393Test +@TruffleTests class RD5884TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5884Test +@TruffleTests class RD5448TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5448Test +@TruffleTests class RD5238TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5238Test +@TruffleTests class RD3742TruffleTest extends TruffleWithLocalCredentialsTestContext with RD3742Test +@TruffleTests class RD3784TruffleTest extends TruffleWithLocalCredentialsTestContext with RD3784Test +@TruffleTests class RD5784TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5784Test +@TruffleTests class RD4981TruffleTest extends TruffleWithLocalCredentialsTestContext with RD4981Test +@TruffleTests class RD5920TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5920Test +@TruffleTests class RD572TruffleTest extends TruffleWithLocalCredentialsTestContext with RD572Test +@TruffleTests class RD5785TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5785Test +@TruffleTests class RD5491TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5491Test +@TruffleTests class RD7974TruffleTest extends TruffleWithLocalCredentialsTestContext with RD7974Test +@TruffleTests class RD5714TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5714Test +@TruffleTests class RD5697TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5697Test +@TruffleTests class RD5644TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5644Test +@TruffleTests class RD8993TruffleTest extends TruffleWithLocalCredentialsTestContext with RD8993Test +@TruffleTests class RD4529TruffleTest extends TruffleWithLocalCredentialsTestContext with RD4529Test +@TruffleTests class RD5893TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5893Test +@TruffleTests class RD8764TruffleTest extends TruffleWithLocalCredentialsTestContext with RD8764Test +@TruffleTests class RD5979TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5979Test +@TruffleTests class RD5679TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5679Test +@TruffleTests class RD5775TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5775Test +@TruffleTests class RD5851TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5851Test +@TruffleTests class RD5412TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5412Test +@TruffleTests class RD5971TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5971Test +@TruffleTests class RD5968TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5968Test +@TruffleTests class RD5691TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5691Test +@TruffleTests class RD8935TruffleTest extends TruffleWithLocalCredentialsTestContext with RD8935Test +@TruffleTests class RD7924TruffleTest extends TruffleWithLocalCredentialsTestContext with RD7924Test +@TruffleTests class RD5488TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5488Test +@TruffleTests class RD5786TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5786Test +@TruffleTests class RD5722TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5722Test +@TruffleTests class RD5925TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5925Test +@TruffleTests class RD5921TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5921Test +@TruffleTests class RD5932TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5932Test +@TruffleTests class RD5484TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5484Test +@TruffleTests class RD8530TruffleTest extends TruffleWithLocalCredentialsTestContext with RD8530Test +@TruffleTests class RD5685TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5685Test +@TruffleTests class RD5365TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5365Test +@TruffleTests class RD5914TruffleTest extends TruffleWithLocalCredentialsTestContext with RD5914Test +@TruffleTests class RD9137TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9137Test +@TruffleTests class RD9228TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9228Test +@TruffleTests class RD9359TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9359Test +@TruffleTests class RD9255TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9255Test +@TruffleTests class RD9229TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9229Test +@TruffleTests class RD9409TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9409Test +@TruffleTests class RD9479TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9479Test +@TruffleTests class RD9554TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9554Test +@TruffleTests class RD9616TruffleTest extends TruffleWithLocalCredentialsTestContext with RD9616Test +@TruffleTests class RD10194TruffleTest extends TruffleWithLocalCredentialsTestContext with RD10194Test +@TruffleTests class RD10220TruffleTest extends TruffleWithLocalCredentialsTestContext with RD10220Test +@TruffleTests class RD10723TruffleTest extends TruffleWithLocalCredentialsTestContext with RD10723Test +@TruffleTests class RD10801TruffleTest extends TruffleWithLocalCredentialsTestContext with RD10801Test diff --git a/snapi-client/src/test/scala/raw/compiler/rql2/truffle/spec/TruffleSpecTest.scala b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/spec/TruffleSpecTest.scala new file mode 100644 index 000000000..0aee50ef4 --- /dev/null +++ b/snapi-client/src/test/scala/raw/compiler/rql2/truffle/spec/TruffleSpecTest.scala @@ -0,0 +1,57 @@ +/* + * Copyright 2023 RAW Labs S.A. + * + * Use of this software is governed by the Business Source License + * included in the file licenses/BSL.txt. + * + * As of the Change Date specified in that file, in accordance with + * the Business Source License, use of this software will be governed + * by the Apache License, Version 2.0, included in the file + * licenses/APL.txt. + */ + +package raw.compiler.rql2.truffle.spec + +import raw.compiler.rql2.tests.spec._ +import raw.compiler.rql2.truffle.TruffleWithLocalCredentialsTestContext +import raw.testing.tags.TruffleTests + +@TruffleTests class PropagationTruffleTest extends TruffleWithLocalCredentialsTestContext with PropagationTest +@TruffleTests class JoinWithTryRowsTruffleTest extends TruffleWithLocalCredentialsTestContext with JoinWithTryRowsTest +@TruffleTests class ConstTruffleTest extends TruffleWithLocalCredentialsTestContext with ConstTest +@TruffleTests class BinaryExpLeTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpLeTest +@TruffleTests class BinaryExpAndTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpAndTest +@TruffleTests class UnaryExpNotTruffleTest extends TruffleWithLocalCredentialsTestContext with UnaryExpNotTest +@TruffleTests class ProjTruffleTest extends TruffleWithLocalCredentialsTestContext with ProjTest +@TruffleTests class ErrorsTruffleTest extends TruffleWithLocalCredentialsTestContext with ErrorsTest + +@TruffleTests class IfThenElseTruffleTest extends TruffleWithLocalCredentialsTestContext with IfThenElseTest +@TruffleTests class BinaryExpGtTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpGtTest +@TruffleTests class BinaryExpMultTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpMultTest +@TruffleTests class BinaryExpGeTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpGeTest +@TruffleTests class UnaryExpNegTruffleTest extends TruffleWithLocalCredentialsTestContext with UnaryExpNegTest +@TruffleTests class BinaryExpDivTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpDivTest +@TruffleTests class MigrationTruffleTest extends TruffleWithLocalCredentialsTestContext with MigrationTest + +@TruffleTests class LetBindTruffleTest extends TruffleWithLocalCredentialsTestContext with LetBindTest +@TruffleTests class FunAbsTruffleTest extends TruffleWithLocalCredentialsTestContext with FunAbsTest + +@TruffleTests class LetFunRecTruffleTest extends TruffleWithLocalCredentialsTestContext with LetFunRecTest +@TruffleTests class ClosureTruffleTest extends TruffleWithLocalCredentialsTestContext with ClosureTest +@TruffleTests class BinaryExpOrTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpOrTest +@TruffleTests class BinaryExpEqTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpEqTest +@TruffleTests class BinaryExpNeqTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpNeqTest +@TruffleTests class ImplicitCastTruffleTest extends TruffleWithLocalCredentialsTestContext with ImplicitCastTest +@TruffleTests class BinaryExpModTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpModTest +@TruffleTests class BinaryExpSubTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpSubTest +@TruffleTests class LetTypeTruffleTest extends TruffleWithLocalCredentialsTestContext with LetTypeTest +@TruffleTests class BinaryExpPlusTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpPlusTest +@TruffleTests class BasicStagedCompilerTruffleTest + extends TruffleWithLocalCredentialsTestContext + with BasicStagedCompilerTest +@TruffleTests class BinaryExpLtTruffleTest extends TruffleWithLocalCredentialsTestContext with BinaryExpLtTest +@TruffleTests class PackageNameTruffleTest extends TruffleWithLocalCredentialsTestContext with PackageNameTest + +@TruffleTests class StagedCompilerTruffleTest extends TruffleWithLocalCredentialsTestContext with StagedCompilerTest + +@TruffleTests class LetFunTruffleTest extends TruffleWithLocalCredentialsTestContext with LetFunTest diff --git a/snapi-frontend/src/main/java/module-info.java b/snapi-frontend/src/main/java/module-info.java index 353bfd7b2..ddd304b16 100644 --- a/snapi-frontend/src/main/java/module-info.java +++ b/snapi-frontend/src/main/java/module-info.java @@ -41,10 +41,6 @@ requires raw.sources; requires raw.snapi.parser; - exports raw.auth.api; - exports raw.creds.client; - exports raw.creds.local; - exports raw.creds.protocol; exports raw.compiler.base; exports raw.compiler.base.errors; exports raw.compiler.base.source; @@ -60,26 +56,9 @@ exports raw.compiler.utils; exports raw.inferrer.api; exports raw.inferrer.local; - exports raw.rest.client; - exports raw.rest.common; opens raw.inferrer.api to com.fasterxml.jackson.databind; - opens raw.auth.api to - com.fasterxml.jackson.databind; - opens raw.rest.common to - com.fasterxml.jackson.databind; - - uses raw.inferrer.api.InferrerServiceBuilder; - - provides raw.inferrer.api.InferrerServiceBuilder with - raw.inferrer.local.LocalInferrerServiceBuilder; - - uses raw.creds.api.CredentialsServiceBuilder; - - provides raw.creds.api.CredentialsServiceBuilder with - raw.creds.local.LocalCredentialsServiceBuilder, - raw.creds.client.ClientCredentialsServiceBuilder; uses raw.compiler.rql2.api.PackageExtension; diff --git a/snapi-frontend/src/main/resources/META-INF/services/raw.creds.api.CredentialsServiceBuilder b/snapi-frontend/src/main/resources/META-INF/services/raw.creds.api.CredentialsServiceBuilder deleted file mode 100644 index fad7e09d8..000000000 --- a/snapi-frontend/src/main/resources/META-INF/services/raw.creds.api.CredentialsServiceBuilder +++ /dev/null @@ -1,2 +0,0 @@ -raw.creds.local.LocalCredentialsServiceBuilder -raw.creds.client.ClientCredentialsServiceBuilder diff --git a/snapi-frontend/src/main/resources/META-INF/services/raw.inferrer.api.InferrerServiceBuilder b/snapi-frontend/src/main/resources/META-INF/services/raw.inferrer.api.InferrerServiceBuilder deleted file mode 100644 index ee00d3138..000000000 --- a/snapi-frontend/src/main/resources/META-INF/services/raw.inferrer.api.InferrerServiceBuilder +++ /dev/null @@ -1 +0,0 @@ -raw.inferrer.local.LocalInferrerServiceBuilder \ No newline at end of file diff --git a/snapi-frontend/src/main/scala/raw/compiler/rql2/antlr4/RawSnapiVisitor.scala b/snapi-frontend/src/main/scala/raw/compiler/rql2/antlr4/RawSnapiVisitor.scala index e49f87404..6d74d601b 100644 --- a/snapi-frontend/src/main/scala/raw/compiler/rql2/antlr4/RawSnapiVisitor.scala +++ b/snapi-frontend/src/main/scala/raw/compiler/rql2/antlr4/RawSnapiVisitor.scala @@ -12,15 +12,15 @@ package raw.compiler.rql2.antlr4 -import jakarta.xml.bind.DatatypeConverter import org.antlr.v4.runtime.ParserRuleContext +import org.apache.commons.codec.binary.Hex import org.bitbucket.inkytonik.kiama.util.{Positions, Source} import raw.client.api.{ErrorMessage, ErrorPosition, ErrorRange} import raw.compiler.base.source.Type import raw.compiler.common.source._ import raw.compiler.rql2.builtin.{ListPackageBuilder, RecordPackageBuilder} import raw.compiler.rql2.generated.{SnapiParser, SnapiParserBaseVisitor} -import raw.compiler.rql2.source.{LetDecl, _} +import raw.compiler.rql2.source._ import raw.utils.RawUtils import scala.collection.JavaConverters._ @@ -1284,7 +1284,7 @@ class RawSnapiVisitor( .flatMap { context => Option(context.BINARY_CONST()) .map(bContext => - Try(BinaryConst(DatatypeConverter.parseHexBinary(bContext.getText.drop(2)))).getOrElse { + Try(BinaryConst(Hex.decodeHex(bContext.getText.drop(2)))).getOrElse { errors.addError( ErrorMessage( "Invalid binary literal", diff --git a/snapi-frontend/src/main/scala/raw/creds/client/ClientCredentialsServiceBuilder.scala b/snapi-frontend/src/main/scala/raw/creds/client/ClientCredentialsServiceBuilder.scala deleted file mode 100644 index b2f0298ca..000000000 --- a/snapi-frontend/src/main/scala/raw/creds/client/ClientCredentialsServiceBuilder.scala +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.creds.client - -import com.typesafe.scalalogging.StrictLogging -import raw.utils.RawSettings -import raw.creds.api.CredentialsServiceBuilder - -class ClientCredentialsServiceBuilder extends CredentialsServiceBuilder with StrictLogging { - - override val name: String = "client" - - override def build(implicit settings: RawSettings): ClientCredentialsService = { - new ClientCredentialsService - } - -} diff --git a/snapi-frontend/src/main/scala/raw/creds/local/LocalCredentialsServiceBuilder.scala b/snapi-frontend/src/main/scala/raw/creds/local/LocalCredentialsServiceBuilder.scala deleted file mode 100644 index 5240d9d2a..000000000 --- a/snapi-frontend/src/main/scala/raw/creds/local/LocalCredentialsServiceBuilder.scala +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.creds.local - -import raw.creds.api.CredentialsService -import raw.utils.RawSettings - -class LocalCredentialsServiceBuilder extends raw.creds.api.CredentialsServiceBuilder { - - override val name: String = "local" - - override def build(implicit settings: RawSettings): CredentialsService = { - new LocalCredentialsService - } - -} diff --git a/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerProperties.scala b/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerProperties.scala index b13951969..11067c7fc 100644 --- a/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerProperties.scala +++ b/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerProperties.scala @@ -57,23 +57,6 @@ final case class ManyCsvInferrerProperties( maybeQuoteChars: Option[Seq[Option[Char]]] ) extends InferrerProperties -final case class ExcelInferrerProperties( - location: LocationDescription, - maybeSampleSize: Option[Int], - maybeSheet: Option[String], - maybeHasHeader: Option[Boolean], - maybeAt: Option[String] -) extends InferrerProperties - -final case class ManyExcelInferrerProperties( - location: LocationDescription, - maybeSampleSize: Option[Int], - maybeSampleFiles: Option[Int], - maybeSheet: Option[String], - maybeHasHeader: Option[Boolean], - maybeAt: Option[String] -) extends InferrerProperties - final case class HjsonInferrerProperties( location: LocationDescription, maybeSampleSize: Option[Int], diff --git a/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerServiceBuilder.scala b/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerServiceBuilder.scala deleted file mode 100644 index 5b340b404..000000000 --- a/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerServiceBuilder.scala +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.inferrer.api - -import raw.sources.api.SourceContext - -trait InferrerServiceBuilder { - - def name: String - - def build(implicit sourceContext: SourceContext): InferrerService - -} diff --git a/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerServiceProvider.scala b/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerServiceProvider.scala index 5aee0502f..431c7d117 100644 --- a/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerServiceProvider.scala +++ b/snapi-frontend/src/main/scala/raw/inferrer/api/InferrerServiceProvider.scala @@ -12,47 +12,19 @@ package raw.inferrer.api -import java.util.ServiceLoader -import scala.collection.JavaConverters._ +import raw.inferrer.local.LocalInferrerService + import raw.sources.api.SourceContext object InferrerServiceProvider { private val INFERRER_IMPL = "raw.inferrer.impl" - def apply(maybeClassLoader: Option[ClassLoader] = None)(implicit sourceContext: SourceContext): InferrerService = { - maybeClassLoader match { - case Some(cl) => apply(cl) - case None => apply() - } - } - def apply()(implicit sourceContext: SourceContext): InferrerService = { - build() - } - - def apply(classLoader: ClassLoader)(implicit sourceContext: SourceContext): InferrerService = { - build(Some(classLoader)) - } - - @throws[InferrerException] - private def build( - maybeClassLoader: Option[ClassLoader] = None - )(implicit sourceContext: SourceContext): InferrerService = { - val services = maybeClassLoader match { - case Some(cl) => ServiceLoader.load(classOf[InferrerServiceBuilder], cl).asScala.toArray - case None => ServiceLoader.load(classOf[InferrerServiceBuilder]).asScala.toArray - } - if (services.isEmpty) { - throw new InferrerException("no inferrer service available") - } else if (services.length > 1) { - val implClassName = sourceContext.settings.getString(INFERRER_IMPL) - services.find(p => p.name == implClassName) match { - case Some(builder) => builder.build - case None => throw new InferrerException(s"cannot find inferrer service: $implClassName") - } - } else { - services.head.build + sourceContext.settings.getStringOpt(INFERRER_IMPL) match { + case Some("local") => new LocalInferrerService() + case Some(impl) => throw new InferrerException(s"cannot find inferrer service: $impl") + case None => new LocalInferrerService() } } diff --git a/snapi-frontend/src/main/scala/raw/inferrer/api/InputFormatDescriptors.scala b/snapi-frontend/src/main/scala/raw/inferrer/api/InputFormatDescriptors.scala index b6185655e..7f876f256 100644 --- a/snapi-frontend/src/main/scala/raw/inferrer/api/InputFormatDescriptors.scala +++ b/snapi-frontend/src/main/scala/raw/inferrer/api/InputFormatDescriptors.scala @@ -34,9 +34,6 @@ final case class SqlQueryInputFormatDescriptor( sealed trait InputStreamFormatDescriptor extends InputFormatDescriptor -final case class ExcelInputFormatDescriptor(tipe: SourceType, sheet: String, x0: Int, y0: Int, x1: Int, y1: Int) - extends InputStreamFormatDescriptor - final case class TextInputStreamFormatDescriptor(encoding: Encoding, confidence: Int, format: TextInputFormatDescriptor) extends InputStreamFormatDescriptor { def tipe: SourceType = format.tipe diff --git a/snapi-frontend/src/main/scala/raw/inferrer/local/LocalInferrerService.scala b/snapi-frontend/src/main/scala/raw/inferrer/local/LocalInferrerService.scala index 858468ce3..e2abb4317 100644 --- a/snapi-frontend/src/main/scala/raw/inferrer/local/LocalInferrerService.scala +++ b/snapi-frontend/src/main/scala/raw/inferrer/local/LocalInferrerService.scala @@ -18,7 +18,6 @@ import raw.utils.RawException import raw.inferrer.api._ import raw.inferrer.local.auto.{AutoInferrer, InferrerBufferedSeekableIS} import raw.inferrer.local.csv.{CsvInferrer, CsvMergeTypes} -import raw.inferrer.local.excel.ExcelInferrer import raw.inferrer.local.hjson.HjsonInferrer import raw.inferrer.local.jdbc.JdbcInferrer import raw.inferrer.local.json.JsonInferrer @@ -45,8 +44,6 @@ class LocalInferrerService(implicit sourceContext: SourceContext) private val hjsonInferrer = new HjsonInferrer private val xmlInferrer = new XmlInferrer - private val excelInferrer = new ExcelInferrer - private val jdbcInferrer = new JdbcInferrer protected val autoInferrer = new AutoInferrer( @@ -54,8 +51,7 @@ class LocalInferrerService(implicit sourceContext: SourceContext) csvInferrer, jsonInferrer, hjsonInferrer, - xmlInferrer, - excelInferrer + xmlInferrer ) private val defaultSampleFiles = settings.getInt("raw.inferrer.local.sample-files") @@ -126,29 +122,6 @@ class LocalInferrerService(implicit sourceContext: SourceContext) } } ) - case excel: ExcelInferrerProperties => - val location = ByteStreamLocationProvider.build(excel.location) - val is = location.getInputStream - try { - excelInferrer.infer(is, excel.maybeSheet, excel.maybeHasHeader, excel.maybeAt) - } finally { - is.close() - } - case excel: ManyExcelInferrerProperties => - val location = FileSystemLocationProvider.build(excel.location) - val files = location.ls() - readMany( - files, - excel.maybeSampleFiles, - { file => - val is = file.getInputStream - try { - excelInferrer.infer(is, excel.maybeSheet, excel.maybeHasHeader, excel.maybeAt) - } finally { - is.close() - } - } - ) case hjson: HjsonInferrerProperties => val location = ByteStreamLocationProvider.build(hjson.location) val is = textInputStream(location) @@ -399,14 +372,6 @@ class LocalInferrerService(implicit sourceContext: SourceContext) case _ => LinesInputFormatDescriptor(SourceCollectionType(SourceStringType(false), false), None, false) } TextInputStreamFormatDescriptor(encoding, confidence, merge) - case ( - ExcelInputFormatDescriptor(t1, sheet1, x01, y01, x11, y11), - ExcelInputFormatDescriptor(t2, sheet2, x02, y02, x12, y12) - ) => - if (sheet1 != sheet2 || x01 != x02 || y01 != y02 || x11 != x12 || y11 != y12) { - throw new LocalInferrerException("incompatible excel files found") - } - ExcelInputFormatDescriptor(MergeTypes.maxOf(t1, t2), sheet1, x01, y01, x11, y11) case _ => throw new LocalInferrerException(s"incompatible formats found") } diff --git a/snapi-frontend/src/main/scala/raw/inferrer/local/LocalInferrerServiceBuilder.scala b/snapi-frontend/src/main/scala/raw/inferrer/local/LocalInferrerServiceBuilder.scala deleted file mode 100644 index 94f3ec226..000000000 --- a/snapi-frontend/src/main/scala/raw/inferrer/local/LocalInferrerServiceBuilder.scala +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.inferrer.local - -import raw.inferrer.api.{InferrerService, InferrerServiceBuilder} -import raw.sources.api.SourceContext - -class LocalInferrerServiceBuilder extends InferrerServiceBuilder { - - override val name: String = "local" - - override def build(implicit sourceContext: SourceContext): InferrerService = { - new LocalInferrerService - } -} diff --git a/snapi-frontend/src/main/scala/raw/inferrer/local/auto/AutoInferrer.scala b/snapi-frontend/src/main/scala/raw/inferrer/local/auto/AutoInferrer.scala index 2165ec41f..5823ef603 100644 --- a/snapi-frontend/src/main/scala/raw/inferrer/local/auto/AutoInferrer.scala +++ b/snapi-frontend/src/main/scala/raw/inferrer/local/auto/AutoInferrer.scala @@ -17,7 +17,6 @@ import com.typesafe.scalalogging.StrictLogging import raw.inferrer.api._ import raw.inferrer.local._ import raw.inferrer.local.csv.CsvInferrer -import raw.inferrer.local.excel.ExcelInferrer import raw.inferrer.local.hjson.HjsonInferrer import raw.inferrer.local.json.JsonInferrer import raw.inferrer.local.text.TextInferrer @@ -35,8 +34,7 @@ class AutoInferrer( csvInferrer: CsvInferrer, jsonInferrer: JsonInferrer, hjsonInferrer: HjsonInferrer, - xmlInferrer: XmlInferrer, - excelInferrer: ExcelInferrer + xmlInferrer: XmlInferrer )(implicit protected val sourceContext: SourceContext) extends InferrerErrorHandler with EncodingInferrer @@ -58,13 +56,6 @@ class AutoInferrer( } maybeFileExtension match { - case Some(extension) if extension.equalsIgnoreCase("xls") || extension.equalsIgnoreCase("xlsx") => - val is = location.getInputStream - try { - excelInferrer.infer(is, None, None, None) - } finally { - is.close() - } case _ => location match { case fs: FileSystemLocation => // If it is a file system, check if it is a directory, to attempt to detect Hadoop-like files. diff --git a/snapi-frontend/src/main/scala/raw/inferrer/local/excel/ExcelInferrer.scala b/snapi-frontend/src/main/scala/raw/inferrer/local/excel/ExcelInferrer.scala deleted file mode 100644 index 68cc29851..000000000 --- a/snapi-frontend/src/main/scala/raw/inferrer/local/excel/ExcelInferrer.scala +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.inferrer.local.excel - -import java.io.{BufferedInputStream, InputStream} -import com.typesafe.scalalogging.StrictLogging -import org.apache.poi.ss.usermodel._ -import raw.inferrer.api.{ - ExcelInputFormatDescriptor, - SourceAttrType, - SourceBoolType, - SourceCollectionType, - SourceDoubleType, - SourceNothingType, - SourceNullType, - SourceRecordType, - SourceStringType, - SourceTimestampType, - SourceType -} -import raw.inferrer.local._ - -class ExcelInferrer extends InferrerErrorHandler with MergeTypes with StrictLogging { - - private val atSplit = "([A-Za-z]*)(\\d*):?([A-Za-z]*)(\\d*)".r - - // TODO: Take out maybeAt and make it into separate elements to ease API! - - def infer( - is: InputStream, - maybeSheet: Option[String], - maybeHasHeader: Option[Boolean], - maybeAt: Option[String] - ): ExcelInputFormatDescriptor = { - val wb = WorkbookFactory.create(new BufferedInputStream(is)) - val sheet = maybeSheet.map(wb.getSheet).getOrElse(wb.getSheetAt(0)) // If not specified, open first sheet - - if (sheet == null) { - val message = maybeSheet match { - case Some(name) => s"sheet $name not found in Excel" - case None => "no sheet found in Excel" - } - throw new LocalInferrerException(message) - } - - // some string parsing to extract coordinates as integers - val atSplit(sx0, sy0, sx1, sy1) = - maybeAt.getOrElse(":") // by default we assume no range, all bits will be empty strings - val x0: Int = if (sx0.isEmpty) 0 else columnIndex(sx0) - // if not specified start at the top - val y0 = if (sy0.nonEmpty) sy0.toInt - 1 else 0 - // loop through letters and sum as if they would represent digits between 0 and 25, if empty use None - val ox1: Option[Int] = if (sx1.nonEmpty) Some(columnIndex(sx1)) else None - // go until the end if not specified - val y1: Int = if (sy1.nonEmpty) sy1.toInt - 1 else sheet.getLastRowNum - - val hasHeader = maybeHasHeader.getOrElse(true) // header=true by default - // vertical index range where values are (header implies to skip first, go til the end or whatever was specified) - val rowRange = (if (hasHeader) y0 + 1 else y0) to y1 - - val evaluator = wb.getCreationHelper.createFormulaEvaluator - - def rawType(c: Cell, value: CellValue): SourceType = { - if (value == null) SourceNullType() - else value.getCellType match { - case CellType.BLANK => SourceNullType() - case CellType.STRING => SourceStringType(false) - case CellType.NUMERIC => - if (DateUtil.isCellDateFormatted(c)) SourceTimestampType(None, false) else SourceDoubleType(false) - case CellType.BOOLEAN => SourceBoolType(false) - case CellType.ERROR => throw new LocalInferrerException("cell type with error is not supported") - case CellType.FORMULA => throw new LocalInferrerException("cell type with formula is not supported") - case CellType._NONE => throw new LocalInferrerException("cell type with unknown content is not supported") - } - } - - val rowTypes = for (i <- rowRange) yield { - val row = sheet.getRow(i) - if (row == null) Seq() - else { - val cells = for (x <- x0 to ox1.getOrElse(row.getLastCellNum)) yield { - val c = row.getCell(x) - if (c != null) (c, evaluator.evaluate(c)) - else (null, null) - } - cells.reverse.dropWhile(_._1 == null).reverseMap { case (c, v) => rawType(c, v) } - } - } - - val header = { - val row = sheet.getRow(y0) - if (hasHeader && row == null) - throw new LocalInferrerException(s"no header found in Excel at row ${coordinates(x0, y0)}") - if (hasHeader) { - // replace all empty/null cells by a 'null' cell in order to avoid adding null headers - val allValues = for (i <- x0 to ox1.getOrElse(row.getLastCellNum)) yield { - val cell = row.getCell(i) - if (cell == null || cell.getCellType == CellType.BLANK) null else evaluator.evaluate(cell) - } - for ((value, i) <- allValues.reverse.dropWhile(_ == null).reverse.zipWithIndex) yield { - if (value == null || value.getCellType == CellType.BLANK) s"_${i + 1}" - else { - value.getCellType match { - case CellType.BLANK => null - case CellType.STRING => value.getStringValue - case CellType.NUMERIC => value.getNumberValue.toString - case CellType.BOOLEAN => value.getBooleanValue.toString - case CellType.ERROR => throw new LocalInferrerException("cell type with error is not supported") - case CellType.FORMULA => throw new LocalInferrerException("cell type with formula is not supported") - case CellType._NONE => throw new LocalInferrerException("cell type with unknown content is not supported") - } - } - } - } else { - Iterable.range(0, ox1.getOrElse(x0 + rowTypes.map(_.length).max) - x0).map(i => s"_${i + 1}") - } - } - - val mergedTypes: Seq[SourceType] = - rowTypes.foldLeft(Seq.fill(header.size)(SourceNothingType()): Seq[SourceType])(maxOfRow) - val tipe = SourceCollectionType( - SourceRecordType(mergedTypes.zip(header).map { case (t, h) => SourceAttrType(h, t) }.toVector, false), - false - ) - ExcelInputFormatDescriptor( - tipe, - sheet.getSheetName, - x0, - if (hasHeader) y0 + 1 else y0, - ox1.getOrElse(x0 + mergedTypes.length), - y1 - ) - } - - // given vertical and horizontal indexes, returns the excel coordinate (1,2) => "B - private def coordinates(x_index: Int, y_index: Int) = s"${column(x_index)}${y_index + 1}" - - // computation of the index (0 -> ...) from the string column name - // I make it public because it's tricky and there is a unit-test. - private def column(v: Int): String = { - val alphaDigits = (0 to 'Z' - 'A').map(x => ('A' + x).toChar) - val base = alphaDigits.length - if (v < base) alphaDigits(v).toString - else column(v / base - 1) :+ alphaDigits(v % base) - } - - private def columnIndex(str: String) = { - str.toUpperCase.foldLeft(0) { case (v, c) => 26 * v + (c - 'A' + 1) } - 1 - } - -} diff --git a/snapi-truffle/src/main/java/module-info.java b/snapi-truffle/src/main/java/module-info.java index 33a625043..4c892eab3 100644 --- a/snapi-truffle/src/main/java/module-info.java +++ b/snapi-truffle/src/main/java/module-info.java @@ -39,7 +39,6 @@ requires java.net.http; requires com.ibm.icu; requires spring.core; - requires spring.jcl; requires com.esotericsoftware.kryo; requires com.esotericsoftware.minlog; requires com.esotericsoftware.reflectasm; @@ -50,7 +49,6 @@ requires com.google.common; requires jul.to.slf4j; - uses raw.creds.api.CredentialsServiceBuilder; uses raw.compiler.rql2.api.EntryExtension; uses raw.sources.jdbc.api.JdbcTableLocationBuilder; uses raw.compiler.rql2.api.PackageExtension; @@ -58,7 +56,6 @@ uses raw.sources.filesystem.api.FileSystemLocationBuilder; uses raw.sources.bytestream.api.ByteStreamLocationBuilder; uses raw.sources.jdbc.api.JdbcLocationBuilder; - uses raw.inferrer.api.InferrerServiceBuilder; uses raw.sources.jdbc.api.JdbcSchemaLocationBuilder; provides com.oracle.truffle.api.provider.TruffleLanguageProvider with diff --git a/snapi-truffle/src/main/java/raw/runtime/truffle/RawLanguageCache.java b/snapi-truffle/src/main/java/raw/runtime/truffle/RawLanguageCache.java index ec39d6282..df275ee42 100644 --- a/snapi-truffle/src/main/java/raw/runtime/truffle/RawLanguageCache.java +++ b/snapi-truffle/src/main/java/raw/runtime/truffle/RawLanguageCache.java @@ -69,13 +69,13 @@ private Value get(AuthenticatedUser user, RawSettings rawSettings) { // Create services on-demand. CredentialsService credentialsService = credentialsCache.computeIfAbsent( - rawSettings, k -> CredentialsServiceProvider.apply(classLoader, rawSettings)); + rawSettings, k -> CredentialsServiceProvider.apply(rawSettings)); return map.computeIfAbsent( user, k -> { SourceContext sourceContext = new SourceContext(user, credentialsService, rawSettings, new Some<>(classLoader)); - InferrerService inferrer = InferrerServiceProvider.apply(classLoader, sourceContext); + InferrerService inferrer = InferrerServiceProvider.apply(sourceContext); CompilerContext compilerContext = new CompilerContext( "rql2-truffle", diff --git a/snapi-truffle/src/main/java/raw/runtime/truffle/ast/expressions/builtin/location_package/LocationDescribeNode.java b/snapi-truffle/src/main/java/raw/runtime/truffle/ast/expressions/builtin/location_package/LocationDescribeNode.java index 3372ac360..1773394ab 100644 --- a/snapi-truffle/src/main/java/raw/runtime/truffle/ast/expressions/builtin/location_package/LocationDescribeNode.java +++ b/snapi-truffle/src/main/java/raw/runtime/truffle/ast/expressions/builtin/location_package/LocationDescribeNode.java @@ -63,17 +63,7 @@ protected Object doDescribe( Map properties = new HashMap<>(); boolean sampled = false; - if (descriptor instanceof ExcelInputFormatDescriptor) { - ExcelInputFormatDescriptor excelDescriptor = (ExcelInputFormatDescriptor) descriptor; - format = "excel"; - comment = ""; - tipe = excelDescriptor.tipe(); - properties.put("sheet", excelDescriptor.sheet()); - properties.put("x0", String.valueOf(excelDescriptor.x0())); - properties.put("y0", String.valueOf(excelDescriptor.y0())); - properties.put("x1", String.valueOf(excelDescriptor.x1())); - properties.put("y1", String.valueOf(excelDescriptor.y1())); - } else if (descriptor instanceof SqlTableInputFormatDescriptor) { + if (descriptor instanceof SqlTableInputFormatDescriptor) { SqlTableInputFormatDescriptor sqlTableDescriptor = (SqlTableInputFormatDescriptor) descriptor; format = "relational table"; diff --git a/sources/src/main/java/module-info.java b/sources/src/main/java/module-info.java index 1bc50fc82..4c76eab13 100644 --- a/sources/src/main/java/module-info.java +++ b/sources/src/main/java/module-info.java @@ -26,7 +26,6 @@ requires org.apache.httpcomponents.client5.httpclient5; requires java.net.http; requires spring.core; - requires spring.jcl; requires typesafe.config; requires typesafe.scalalogging; requires ch.qos.logback.classic; @@ -61,7 +60,13 @@ requires raw.utils; requires raw.client; + exports raw.auth.api; + exports raw.rest.client; + exports raw.rest.common; exports raw.creds.api; + exports raw.creds.client; + exports raw.creds.local; + exports raw.creds.protocol; exports raw.sources.api; exports raw.sources.bytestream.api; exports raw.sources.bytestream.github; @@ -81,59 +86,10 @@ exports raw.sources.jdbc.oracle; exports raw.sources.jdbc.teradata; + opens raw.auth.api to + com.fasterxml.jackson.databind; + opens raw.rest.common to + com.fasterxml.jackson.databind; opens raw.creds.api to com.fasterxml.jackson.databind; - - uses raw.creds.api.CredentialsServiceBuilder; - uses raw.sources.bytestream.api.ByteStreamLocationBuilder; - - provides raw.sources.bytestream.api.ByteStreamLocationBuilder with - raw.sources.filesystem.local.LocalFileSystemLocationBuilder, - raw.sources.filesystem.dropbox.DropboxFileSystemLocationBuilder, - raw.sources.filesystem.s3.S3FileSystemLocationBuilder, - raw.sources.filesystem.mock.MockFileSystemLocationBuilder, - raw.sources.bytestream.github.GithubByteStreamLocationBuilder, - raw.sources.bytestream.http.HttpByteStreamLocationBuilder, - raw.sources.bytestream.in_memory.InMemoryByteStreamLocationBuilder; - - uses raw.sources.filesystem.api.FileSystemLocationBuilder; - - provides raw.sources.filesystem.api.FileSystemLocationBuilder with - raw.sources.filesystem.local.LocalFileSystemLocationBuilder, - raw.sources.filesystem.dropbox.DropboxFileSystemLocationBuilder, - raw.sources.filesystem.s3.S3FileSystemLocationBuilder, - raw.sources.filesystem.mock.MockFileSystemLocationBuilder; - - uses raw.sources.jdbc.api.JdbcLocationBuilder; - - provides raw.sources.jdbc.api.JdbcLocationBuilder with - raw.sources.jdbc.mysql.MySqlLocationBuilder, - raw.sources.jdbc.pgsql.PostgresqlLocationBuilder, - raw.sources.jdbc.snowflake.SnowflakeLocationBuilder, - raw.sources.jdbc.sqlite.SqliteLocationBuilder, - raw.sources.jdbc.sqlserver.SqlServerLocationBuilder, - raw.sources.jdbc.oracle.OracleLocationBuilder, - raw.sources.jdbc.teradata.TeradataLocationBuilder; - - uses raw.sources.jdbc.api.JdbcSchemaLocationBuilder; - - provides raw.sources.jdbc.api.JdbcSchemaLocationBuilder with - raw.sources.jdbc.mysql.MySqlSchemaLocationBuilder, - raw.sources.jdbc.pgsql.PostgresqlSchemaLocationBuilder, - raw.sources.jdbc.snowflake.SnowflakeSchemaLocationBuilder, - raw.sources.jdbc.sqlite.SqliteSchemaLocationBuilder, - raw.sources.jdbc.sqlserver.SqlServerSchemaLocationBuilder, - raw.sources.jdbc.oracle.OracleSchemaLocationBuilder, - raw.sources.jdbc.teradata.TeradataSchemaLocationBuilder; - - uses raw.sources.jdbc.api.JdbcTableLocationBuilder; - - provides raw.sources.jdbc.api.JdbcTableLocationBuilder with - raw.sources.jdbc.mysql.MySqlTableLocationBuilder, - raw.sources.jdbc.pgsql.PostgresqlTableLocationBuilder, - raw.sources.jdbc.snowflake.SnowflakeTableLocationBuilder, - raw.sources.jdbc.sqlite.SqliteTableLocationBuilder, - raw.sources.jdbc.sqlserver.SqlServerTableLocationBuilder, - raw.sources.jdbc.oracle.OracleTableLocationBuilder, - raw.sources.jdbc.teradata.TeradataTableLocationBuilder; } diff --git a/sources/src/main/resources/META-INF/services/raw.sources.bytestream.api.ByteStreamLocationBuilder b/sources/src/main/resources/META-INF/services/raw.sources.bytestream.api.ByteStreamLocationBuilder deleted file mode 100644 index 6e64c4923..000000000 --- a/sources/src/main/resources/META-INF/services/raw.sources.bytestream.api.ByteStreamLocationBuilder +++ /dev/null @@ -1,7 +0,0 @@ -raw.sources.filesystem.local.LocalFileSystemLocationBuilder -raw.sources.filesystem.dropbox.DropboxFileSystemLocationBuilder -raw.sources.bytestream.github.GithubByteStreamLocationBuilder -raw.sources.bytestream.http.HttpByteStreamLocationBuilder -raw.sources.bytestream.in_memory.InMemoryByteStreamLocationBuilder -raw.sources.filesystem.mock.MockFileSystemLocationBuilder -raw.sources.filesystem.s3.S3FileSystemLocationBuilder \ No newline at end of file diff --git a/sources/src/main/resources/META-INF/services/raw.sources.filesystem.api.FileSystemLocationBuilder b/sources/src/main/resources/META-INF/services/raw.sources.filesystem.api.FileSystemLocationBuilder deleted file mode 100644 index 3afa722c9..000000000 --- a/sources/src/main/resources/META-INF/services/raw.sources.filesystem.api.FileSystemLocationBuilder +++ /dev/null @@ -1,4 +0,0 @@ -raw.sources.filesystem.local.LocalFileSystemLocationBuilder -raw.sources.filesystem.dropbox.DropboxFileSystemLocationBuilder -raw.sources.filesystem.mock.MockFileSystemLocationBuilder -raw.sources.filesystem.s3.S3FileSystemLocationBuilder \ No newline at end of file diff --git a/sources/src/main/resources/META-INF/services/raw.sources.jdbc.api.JdbcLocationBuilder b/sources/src/main/resources/META-INF/services/raw.sources.jdbc.api.JdbcLocationBuilder deleted file mode 100644 index 0ffc6a7c6..000000000 --- a/sources/src/main/resources/META-INF/services/raw.sources.jdbc.api.JdbcLocationBuilder +++ /dev/null @@ -1,7 +0,0 @@ -raw.sources.jdbc.sqlite.SqliteLocationBuilder -raw.sources.jdbc.snowflake.SnowflakeLocationBuilder -raw.sources.jdbc.pgsql.PostgresqlLocationBuilder -raw.sources.jdbc.mysql.MySqlLocationBuilder -raw.sources.jdbc.sqlserver.SqlServerLocationBuilder -raw.sources.jdbc.oracle.OracleLocationBuilder -raw.sources.jdbc.teradata.TeradataLocationBuilder \ No newline at end of file diff --git a/sources/src/main/resources/META-INF/services/raw.sources.jdbc.api.JdbcSchemaLocationBuilder b/sources/src/main/resources/META-INF/services/raw.sources.jdbc.api.JdbcSchemaLocationBuilder deleted file mode 100644 index c815693f2..000000000 --- a/sources/src/main/resources/META-INF/services/raw.sources.jdbc.api.JdbcSchemaLocationBuilder +++ /dev/null @@ -1,7 +0,0 @@ -raw.sources.jdbc.sqlite.SqliteSchemaLocationBuilder -raw.sources.jdbc.snowflake.SnowflakeSchemaLocationBuilder -raw.sources.jdbc.pgsql.PostgresqlSchemaLocationBuilder -raw.sources.jdbc.mysql.MySqlSchemaLocationBuilder -raw.sources.jdbc.sqlserver.SqlServerSchemaLocationBuilder -raw.sources.jdbc.oracle.OracleSchemaLocationBuilder -raw.sources.jdbc.teradata.TeradataSchemaLocationBuilder \ No newline at end of file diff --git a/sources/src/main/resources/META-INF/services/raw.sources.jdbc.api.JdbcTableLocationBuilder b/sources/src/main/resources/META-INF/services/raw.sources.jdbc.api.JdbcTableLocationBuilder deleted file mode 100644 index b9840d37e..000000000 --- a/sources/src/main/resources/META-INF/services/raw.sources.jdbc.api.JdbcTableLocationBuilder +++ /dev/null @@ -1,7 +0,0 @@ -raw.sources.jdbc.sqlite.SqliteTableLocationBuilder -raw.sources.jdbc.snowflake.SnowflakeTableLocationBuilder -raw.sources.jdbc.pgsql.PostgresqlTableLocationBuilder -raw.sources.jdbc.mysql.MySqlTableLocationBuilder -raw.sources.jdbc.sqlserver.SqlServerTableLocationBuilder -raw.sources.jdbc.oracle.OracleTableLocationBuilder -raw.sources.jdbc.teradata.TeradataTableLocationBuilder \ No newline at end of file diff --git a/snapi-frontend/src/main/scala/raw/auth/api/AuthException.scala b/sources/src/main/scala/raw/auth/api/AuthException.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/auth/api/AuthException.scala rename to sources/src/main/scala/raw/auth/api/AuthException.scala diff --git a/snapi-frontend/src/main/scala/raw/auth/api/Tokens.scala b/sources/src/main/scala/raw/auth/api/Tokens.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/auth/api/Tokens.scala rename to sources/src/main/scala/raw/auth/api/Tokens.scala diff --git a/sources/src/main/scala/raw/creds/api/CredentialsServiceBuilder.scala b/sources/src/main/scala/raw/creds/api/CredentialsServiceBuilder.scala deleted file mode 100644 index 94fe3d1c5..000000000 --- a/sources/src/main/scala/raw/creds/api/CredentialsServiceBuilder.scala +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2023 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package raw.creds.api - -import raw.utils.RawSettings - -trait CredentialsServiceBuilder { - - def name: String - - def build(implicit settings: RawSettings): CredentialsService - -} diff --git a/sources/src/main/scala/raw/creds/api/CredentialsServiceProvider.scala b/sources/src/main/scala/raw/creds/api/CredentialsServiceProvider.scala index 0c18b41e1..a13dd2a9e 100644 --- a/sources/src/main/scala/raw/creds/api/CredentialsServiceProvider.scala +++ b/sources/src/main/scala/raw/creds/api/CredentialsServiceProvider.scala @@ -12,47 +12,20 @@ package raw.creds.api +import raw.creds.client.ClientCredentialsService +import raw.creds.local.LocalCredentialsService import raw.utils.RawSettings -import java.util.ServiceLoader -import scala.collection.JavaConverters._ - object CredentialsServiceProvider { private val CREDS_IMPL = "raw.creds.impl" - def apply(maybeClassLoader: Option[ClassLoader] = None)(implicit settings: RawSettings): CredentialsService = { - maybeClassLoader match { - case Some(cl) => apply(cl) - case None => apply() - } - } - def apply()(implicit settings: RawSettings): CredentialsService = { - build() - } - - def apply(classLoader: ClassLoader)(implicit settings: RawSettings): CredentialsService = { - build(Some(classLoader)) - } - - private def build( - maybeClassLoader: Option[ClassLoader] = None - )(implicit settings: RawSettings): CredentialsService = { - val services = maybeClassLoader match { - case Some(cl) => ServiceLoader.load(classOf[CredentialsServiceBuilder], cl).asScala.toArray - case None => ServiceLoader.load(classOf[CredentialsServiceBuilder]).asScala.toArray - } - if (services.isEmpty) { - throw new CredentialsException("no credentials service available") - } else if (services.size > 1) { - val implClassName = settings.getString(CREDS_IMPL) - services.find(p => p.name == implClassName) match { - case Some(builder) => builder.build - case None => throw new CredentialsException(s"cannot find credentials service: $implClassName") - } - } else { - services.head.build + settings.getStringOpt(CREDS_IMPL) match { + case Some("client") => new ClientCredentialsService + case Some("local") => new LocalCredentialsService + case Some(impl) => throw new CredentialsException(s"cannot find credentials service: $impl") + case None => throw new CredentialsException("no credentials service defined") } } diff --git a/snapi-frontend/src/main/scala/raw/creds/client/ClientCredentials.scala b/sources/src/main/scala/raw/creds/client/ClientCredentials.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/creds/client/ClientCredentials.scala rename to sources/src/main/scala/raw/creds/client/ClientCredentials.scala diff --git a/snapi-frontend/src/main/scala/raw/creds/client/ClientCredentialsException.scala b/sources/src/main/scala/raw/creds/client/ClientCredentialsException.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/creds/client/ClientCredentialsException.scala rename to sources/src/main/scala/raw/creds/client/ClientCredentialsException.scala diff --git a/snapi-frontend/src/main/scala/raw/creds/client/ClientCredentialsService.scala b/sources/src/main/scala/raw/creds/client/ClientCredentialsService.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/creds/client/ClientCredentialsService.scala rename to sources/src/main/scala/raw/creds/client/ClientCredentialsService.scala diff --git a/snapi-frontend/src/main/scala/raw/creds/local/LocalCredentialsService.scala b/sources/src/main/scala/raw/creds/local/LocalCredentialsService.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/creds/local/LocalCredentialsService.scala rename to sources/src/main/scala/raw/creds/local/LocalCredentialsService.scala diff --git a/snapi-frontend/src/main/scala/raw/creds/protocol/ProtocolCredentials.scala b/sources/src/main/scala/raw/creds/protocol/ProtocolCredentials.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/creds/protocol/ProtocolCredentials.scala rename to sources/src/main/scala/raw/creds/protocol/ProtocolCredentials.scala diff --git a/snapi-frontend/src/main/scala/raw/rest/client/ClientExceptions.scala b/sources/src/main/scala/raw/rest/client/ClientExceptions.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/rest/client/ClientExceptions.scala rename to sources/src/main/scala/raw/rest/client/ClientExceptions.scala diff --git a/snapi-frontend/src/main/scala/raw/rest/client/RestClient.scala b/sources/src/main/scala/raw/rest/client/RestClient.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/rest/client/RestClient.scala rename to sources/src/main/scala/raw/rest/client/RestClient.scala diff --git a/snapi-frontend/src/main/scala/raw/rest/common/RawHttpHeaders.scala b/sources/src/main/scala/raw/rest/common/RawHttpHeaders.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/rest/common/RawHttpHeaders.scala rename to sources/src/main/scala/raw/rest/common/RawHttpHeaders.scala diff --git a/snapi-frontend/src/main/scala/raw/rest/common/RestError.scala b/sources/src/main/scala/raw/rest/common/RestError.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/rest/common/RestError.scala rename to sources/src/main/scala/raw/rest/common/RestError.scala diff --git a/snapi-frontend/src/main/scala/raw/rest/common/RestJsonMapper.scala b/sources/src/main/scala/raw/rest/common/RestJsonMapper.scala similarity index 100% rename from snapi-frontend/src/main/scala/raw/rest/common/RestJsonMapper.scala rename to sources/src/main/scala/raw/rest/common/RestJsonMapper.scala diff --git a/sources/src/main/scala/raw/sources/api/SourceContext.scala b/sources/src/main/scala/raw/sources/api/SourceContext.scala index 67129202d..962a046cd 100644 --- a/sources/src/main/scala/raw/sources/api/SourceContext.scala +++ b/sources/src/main/scala/raw/sources/api/SourceContext.scala @@ -18,9 +18,6 @@ import raw.sources.bytestream.api.ByteStreamLocationBuilder import raw.sources.filesystem.api.FileSystemLocationBuilder import raw.sources.jdbc.api.{JdbcLocationBuilder, JdbcSchemaLocationBuilder, JdbcTableLocationBuilder} -import scala.collection.JavaConverters._ -import java.util.ServiceLoader - class SourceContext( val user: AuthenticatedUser, val credentialsService: CredentialsService, @@ -28,31 +25,51 @@ class SourceContext( val maybeClassLoader: Option[ClassLoader] ) { - val byteStreamLocationBuilderServices: Array[ByteStreamLocationBuilder] = { - maybeClassLoader match { - case Some(cl) => ServiceLoader.load(classOf[ByteStreamLocationBuilder], cl).asScala.toArray - case None => ServiceLoader.load(classOf[ByteStreamLocationBuilder]).asScala.toArray - } - } - - val fileSystemLocationBuilderServices: Array[FileSystemLocationBuilder] = maybeClassLoader match { - case Some(cl) => ServiceLoader.load(classOf[FileSystemLocationBuilder], cl).asScala.toArray - case None => ServiceLoader.load(classOf[FileSystemLocationBuilder]).asScala.toArray - } - - val jdbcLocationBuilderServices: Array[JdbcLocationBuilder] = maybeClassLoader match { - case Some(cl) => ServiceLoader.load(classOf[JdbcLocationBuilder], cl).asScala.toArray - case None => ServiceLoader.load(classOf[JdbcLocationBuilder]).asScala.toArray - } - - val jdbcSchemaLocationBuilderServices: Array[JdbcSchemaLocationBuilder] = maybeClassLoader match { - case Some(cl) => ServiceLoader.load(classOf[JdbcSchemaLocationBuilder], cl).asScala.toArray - case None => ServiceLoader.load(classOf[JdbcSchemaLocationBuilder]).asScala.toArray - } - - val jdbcTableLocationBuilderServices: Array[JdbcTableLocationBuilder] = maybeClassLoader match { - case Some(cl) => ServiceLoader.load(classOf[JdbcTableLocationBuilder], cl).asScala.toArray - case None => ServiceLoader.load(classOf[JdbcTableLocationBuilder]).asScala.toArray - } + val byteStreamLocationBuilderServices: Array[ByteStreamLocationBuilder] = Array( + new raw.sources.filesystem.local.LocalFileSystemLocationBuilder, + new raw.sources.filesystem.dropbox.DropboxFileSystemLocationBuilder, + new raw.sources.bytestream.github.GithubByteStreamLocationBuilder, + new raw.sources.bytestream.http.HttpByteStreamLocationBuilder, + new raw.sources.bytestream.in_memory.InMemoryByteStreamLocationBuilder, + new raw.sources.filesystem.mock.MockFileSystemLocationBuilder, + new raw.sources.filesystem.s3.S3FileSystemLocationBuilder + ) + + val fileSystemLocationBuilderServices: Array[FileSystemLocationBuilder] = Array( + new raw.sources.filesystem.local.LocalFileSystemLocationBuilder, + new raw.sources.filesystem.dropbox.DropboxFileSystemLocationBuilder, + new raw.sources.filesystem.mock.MockFileSystemLocationBuilder, + new raw.sources.filesystem.s3.S3FileSystemLocationBuilder + ) + + val jdbcLocationBuilderServices: Array[JdbcLocationBuilder] = Array( + new raw.sources.jdbc.sqlite.SqliteLocationBuilder, + new raw.sources.jdbc.snowflake.SnowflakeLocationBuilder, + new raw.sources.jdbc.pgsql.PostgresqlLocationBuilder, + new raw.sources.jdbc.mysql.MySqlLocationBuilder, + new raw.sources.jdbc.sqlserver.SqlServerLocationBuilder, + new raw.sources.jdbc.oracle.OracleLocationBuilder, + new raw.sources.jdbc.teradata.TeradataLocationBuilder + ) + + val jdbcSchemaLocationBuilderServices: Array[JdbcSchemaLocationBuilder] = Array( + new raw.sources.jdbc.sqlite.SqliteSchemaLocationBuilder, + new raw.sources.jdbc.snowflake.SnowflakeSchemaLocationBuilder, + new raw.sources.jdbc.pgsql.PostgresqlSchemaLocationBuilder, + new raw.sources.jdbc.mysql.MySqlSchemaLocationBuilder, + new raw.sources.jdbc.sqlserver.SqlServerSchemaLocationBuilder, + new raw.sources.jdbc.oracle.OracleSchemaLocationBuilder, + new raw.sources.jdbc.teradata.TeradataSchemaLocationBuilder + ) + + val jdbcTableLocationBuilderServices: Array[JdbcTableLocationBuilder] = Array( + new raw.sources.jdbc.sqlite.SqliteTableLocationBuilder, + new raw.sources.jdbc.snowflake.SnowflakeTableLocationBuilder, + new raw.sources.jdbc.pgsql.PostgresqlTableLocationBuilder, + new raw.sources.jdbc.mysql.MySqlTableLocationBuilder, + new raw.sources.jdbc.sqlserver.SqlServerTableLocationBuilder, + new raw.sources.jdbc.oracle.OracleTableLocationBuilder, + new raw.sources.jdbc.teradata.TeradataTableLocationBuilder + ) } diff --git a/sources/src/main/scala/raw/sources/jdbc/mysql/MySqlClient.scala b/sources/src/main/scala/raw/sources/jdbc/mysql/MySqlClient.scala index b47ec2a8d..97ec9a91c 100644 --- a/sources/src/main/scala/raw/sources/jdbc/mysql/MySqlClient.scala +++ b/sources/src/main/scala/raw/sources/jdbc/mysql/MySqlClient.scala @@ -25,6 +25,8 @@ import scala.util.control.NonFatal class MySqlClient(db: MySqlCredential)(implicit settings: RawSettings) extends JdbcClient { + Class.forName("com.mysql.cj.jdbc.Driver") + private val connectTimeout = getConnectTimeout(TimeUnit.MILLISECONDS) private val readTimeout = getReadTimeout(TimeUnit.MILLISECONDS) diff --git a/sql-client/src/main/scala/raw/client/sql/SqlCompilerService.scala b/sql-client/src/main/scala/raw/client/sql/SqlCompilerService.scala index 66478ac24..4cf55d63c 100644 --- a/sql-client/src/main/scala/raw/client/sql/SqlCompilerService.scala +++ b/sql-client/src/main/scala/raw/client/sql/SqlCompilerService.scala @@ -28,7 +28,7 @@ import scala.util.control.NonFatal class SqlCompilerService(maybeClassLoader: Option[ClassLoader] = None)(implicit protected val settings: RawSettings) extends CompilerService { - private val credentials = CredentialsServiceProvider(maybeClassLoader) + private val credentials = CredentialsServiceProvider() private val connectionPool = new SqlConnectionPool(credentials)