diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5876c29..3b333b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,11 +32,11 @@ jobs: - name: Wait Druid to become available run: wget localhost:8082/status - name: Build for Scala 2.11 - run: sbt ++2.11.12 compile + run: sbt ++2.11.12 compile test:compile - name: Build for Scala 2.12 - run: sbt ++2.12.10 compile + run: sbt ++2.12.11 compile test:compile - name: Build for Scala 2.13 - run: sbt ++2.13.1 compile + run: sbt ++2.13.2 compile test:compile - name: Code coverage report (Scala 2.12) run: sbt coverage test coverageReport - name: Archive code coverage report (Scala 2.12) @@ -51,4 +51,4 @@ jobs: run: (cd docker; make push) env: _JAVA_OPTIONS: "-Xms512m -Xmx4g" - REPOSITORY_OWNER: ${{ github.repository }} \ No newline at end of file + REPOSITORY_OWNER: ${{ github.repository }} diff --git a/README.md b/README.md index cc1e0a3..b3e4276 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,18 @@ Scruid (Scala+Druid) is an open source library that allows you to compose Druid Currently, the API is under heavy development, so changes might occur. +## Release Notes + +Please view the [Releases](https://github.com/ing-bank/scruid/releases) page on GitHub. + +## Installation + +The binaries are hosted on Bintray. We publish builds for Scala 2.11, 2.12 and 2.13. + +```sbt +libraryDependencies += "ing.wbaa.druid" %% "scruid" % "2.4.0" +``` + ## Example queries: Scruid provides query constructors for `TopNQuery`, `GroupByQuery`, `TimeSeriesQuery`, `ScanQuery` and `SearchQuery` (see below for details). You can call the `execute` method on a query to send the query to Druid. This will return a `Future[DruidResponse]`. This response contains the [Circe](http://circe.io) JSON data without having it parsed to a specific case class yet. To interpret this JSON data you can run two methods on a `DruidResponse`: diff --git a/build.sbt b/build.sbt index 19724f9..89bdd47 100644 --- a/build.sbt +++ b/build.sbt @@ -17,15 +17,15 @@ val circeForScala211Version = "0.11.1" // Only for Scala v2.11 val circeLatestVersion = "0.12.1" // for Scala v2.12+ -val mdedetrichVersion = "0.4.0" -val scalacticVersion = "3.0.8" -val scalatestVersion = "3.0.8" -val typesafeConfigVersion = "1.3.3" +val mdedetrichVersion = "0.5.0" +val scalacticVersion = "3.1.1" +val scalatestVersion = "3.1.1" +val typesafeConfigVersion = "1.4.0" val typesafeLoggingVersion = "3.9.2" -val akkaHttpVersion = "10.1.9" +val akkaHttpVersion = "10.1.11" val sealerateVersion = "0.0.6" val logbackVersion = "1.2.3" -val collectionCompatVersion = "2.1.2" +val collectionCompatVersion = "2.1.6" def scalaVersionSpecificDependencies(scalaVer: String): Seq[ModuleID] = { @@ -86,8 +86,8 @@ lazy val commonSettings: Seq[Setting[_]] = Seq( s"git@github.com:${bintrayOrganization.value.get}/${name.value}.git" ) ), - crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.10", "2.13.1"), - scalaVersion in ThisBuild := "2.12.9", + crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.11", "2.13.2"), + scalaVersion in ThisBuild := "2.12.11", scalacOptions ++= Seq(Opts.compile.deprecation, "-Xlint", "-feature"), scalacOptions ++= unusedWarnings(scalaVersion.value), publishArtifact in Test := false, @@ -113,7 +113,7 @@ lazy val root = (project in file(".")) "ca.mrvisser" %% "sealerate" % sealerateVersion, "org.scala-lang.modules" %% "scala-collection-compat" % collectionCompatVersion, "ch.qos.logback" % "logback-classic" % logbackVersion % Provided, - "org.scalactic" %% "scalactic" % scalacticVersion, + "org.scalactic" %% "scalactic" % scalacticVersion % Test, "org.scalatest" %% "scalatest" % scalatestVersion % Test ) ) diff --git a/project/plugins.sbt b/project/plugins.sbt index fd035ba..e2e6f0a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -21,14 +21,14 @@ resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/release resolvers += "Sbt plugins" at "https://dl.bintray.com/sbt/sbt-plugin-releases" -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") -addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "1.3.12") +addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "3.0.3") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4") +addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6") -addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.15") +addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.16") -addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.3.4") +addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.0") -addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.4") +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "2.0.0") diff --git a/src/main/resources/reference.conf b/src/main/resources/reference.conf index 35f9e29..e4b0a41 100644 --- a/src/main/resources/reference.conf +++ b/src/main/resources/reference.conf @@ -1,3 +1,18 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + druid = { host = "localhost" diff --git a/src/main/scala/ing/wbaa/druid/DruidQuery.scala b/src/main/scala/ing/wbaa/druid/DruidQuery.scala index 3a71486..5dc374e 100644 --- a/src/main/scala/ing/wbaa/druid/DruidQuery.scala +++ b/src/main/scala/ing/wbaa/druid/DruidQuery.scala @@ -17,7 +17,7 @@ package ing.wbaa.druid -import java.time.{ ZoneId, ZonedDateTime } +import java.time.ZonedDateTime import akka.NotUsed import akka.stream.scaladsl.Source diff --git a/src/main/scala/ing/wbaa/druid/SQL.scala b/src/main/scala/ing/wbaa/druid/SQL.scala index 9ce09d1..78a9a17 100644 --- a/src/main/scala/ing/wbaa/druid/SQL.scala +++ b/src/main/scala/ing/wbaa/druid/SQL.scala @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package ing.wbaa.druid import java.sql.Timestamp diff --git a/src/main/scala/ing/wbaa/druid/client/DruidAdvancedHttpClient.scala b/src/main/scala/ing/wbaa/druid/client/DruidAdvancedHttpClient.scala index 9162487..2e28ed9 100644 --- a/src/main/scala/ing/wbaa/druid/client/DruidAdvancedHttpClient.scala +++ b/src/main/scala/ing/wbaa/druid/client/DruidAdvancedHttpClient.scala @@ -92,7 +92,7 @@ class DruidAdvancedHttpClient private ( .recover { case ex => healthLogger.warn( - s"healthcheck of ${queryHost.host} on port ${queryHost.port} failed: $ex" + s"healthcheck of ${queryHost.host} on port ${queryHost.port} failed: ${ex.toString}" ) queryHost -> false } diff --git a/src/main/scala/ing/wbaa/druid/client/DruidHttpClient.scala b/src/main/scala/ing/wbaa/druid/client/DruidHttpClient.scala index 3eec08d..450f178 100644 --- a/src/main/scala/ing/wbaa/druid/client/DruidHttpClient.scala +++ b/src/main/scala/ing/wbaa/druid/client/DruidHttpClient.scala @@ -56,7 +56,7 @@ class DruidHttpClient private (connectionFlow: DruidHttpClient.ConnectionFlowTyp .recover { case ex => healthLogger.warn( - s"healthcheck of ${queryHost.host} on port ${queryHost.port} failed: $ex" + s"healthcheck of ${queryHost.host} on port ${queryHost.port} failed: ${ex.toString}" ) false } diff --git a/src/main/scala/ing/wbaa/druid/client/HttpStatusException.scala b/src/main/scala/ing/wbaa/druid/client/HttpStatusException.scala index b774ded..42d8768 100644 --- a/src/main/scala/ing/wbaa/druid/client/HttpStatusException.scala +++ b/src/main/scala/ing/wbaa/druid/client/HttpStatusException.scala @@ -17,7 +17,6 @@ package ing.wbaa.druid.client import akka.http.scaladsl.model.{ HttpEntity, HttpHeader, HttpProtocol, HttpResponse, StatusCode } -import akka.http.scaladsl.unmarshalling.Unmarshal import scala.collection.immutable.Seq import scala.util.Try diff --git a/src/main/scala/ing/wbaa/druid/dql/QueryBuilder.scala b/src/main/scala/ing/wbaa/druid/dql/QueryBuilder.scala index 48edd26..9c275b3 100644 --- a/src/main/scala/ing/wbaa/druid/dql/QueryBuilder.scala +++ b/src/main/scala/ing/wbaa/druid/dql/QueryBuilder.scala @@ -165,7 +165,7 @@ final class QueryBuilder private[dql] () * * @return the resulting time-series query */ - @deprecated(message = "use timeseries.build()") + @deprecated(message = "use timeseries.build()", since = "2.4.0") def build()(implicit druidConfig: DruidConfig = DruidConfig.DefaultConfig): TimeSeriesQuery = timeseries.build() diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml index f2f696e..5d56816 100644 --- a/src/test/resources/logback-test.xml +++ b/src/test/resources/logback-test.xml @@ -1,3 +1,20 @@ + + diff --git a/src/test/scala/ing/wbaa/druid/ConfigOverridesSpec.scala b/src/test/scala/ing/wbaa/druid/ConfigOverridesSpec.scala index bdd327a..9327b39 100644 --- a/src/test/scala/ing/wbaa/druid/ConfigOverridesSpec.scala +++ b/src/test/scala/ing/wbaa/druid/ConfigOverridesSpec.scala @@ -18,11 +18,12 @@ package ing.wbaa.druid import ing.wbaa.druid.client.DruidAdvancedHttpClient -import org.scalatest.{ Matchers, WordSpec } import scala.concurrent.duration._ +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec -class ConfigOverridesSpec extends WordSpec with Matchers { +class ConfigOverridesSpec extends AnyWordSpec with Matchers { def asFiniteDuration(d: java.time.Duration): FiniteDuration = scala.concurrent.duration.Duration.fromNanos(d.toNanos) diff --git a/src/test/scala/ing/wbaa/druid/DruidAdvancedHttpClientSpec.scala b/src/test/scala/ing/wbaa/druid/DruidAdvancedHttpClientSpec.scala index f0611f5..ebbda51 100644 --- a/src/test/scala/ing/wbaa/druid/DruidAdvancedHttpClientSpec.scala +++ b/src/test/scala/ing/wbaa/druid/DruidAdvancedHttpClientSpec.scala @@ -30,13 +30,16 @@ import scala.concurrent.duration._ import scala.concurrent.{ ExecutionContextExecutor, Future } import scala.language.postfixOps import scala.util.Random +import org.scalatest.diagrams.Diagrams +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec class DruidAdvancedHttpClientSpec - extends WordSpec + extends AnyWordSpec with Matchers with ScalaFutures with Inspectors - with DiagrammedAssertions { + with Diagrams { override implicit def patienceConfig: PatienceConfig = PatienceConfig(5 minutes, 100 millis) diff --git a/src/test/scala/ing/wbaa/druid/DruidClientSpec.scala b/src/test/scala/ing/wbaa/druid/DruidClientSpec.scala index f50bf00..f995f6b 100644 --- a/src/test/scala/ing/wbaa/druid/DruidClientSpec.scala +++ b/src/test/scala/ing/wbaa/druid/DruidClientSpec.scala @@ -28,8 +28,10 @@ import org.scalatest.concurrent._ import scala.concurrent.duration._ import scala.language.postfixOps +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec -class DruidClientSpec extends WordSpec with Matchers with ScalaFutures { +class DruidClientSpec extends AnyWordSpec with Matchers with ScalaFutures { override implicit def patienceConfig: PatienceConfig = PatienceConfig(10 seconds, 100 millis) diff --git a/src/test/scala/ing/wbaa/druid/DruidQuerySpec.scala b/src/test/scala/ing/wbaa/druid/DruidQuerySpec.scala index 608f4d8..e5b0e47 100644 --- a/src/test/scala/ing/wbaa/druid/DruidQuerySpec.scala +++ b/src/test/scala/ing/wbaa/druid/DruidQuerySpec.scala @@ -29,8 +29,10 @@ import org.scalatest.concurrent._ import scala.concurrent.duration._ import scala.concurrent.Future import scala.language.postfixOps +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec -class DruidQuerySpec extends WordSpec with Matchers with ScalaFutures { +class DruidQuerySpec extends AnyWordSpec with Matchers with ScalaFutures { override implicit def patienceConfig: PatienceConfig = PatienceConfig(1 minute, 100 millis) diff --git a/src/test/scala/ing/wbaa/druid/QueryContextSpec.scala b/src/test/scala/ing/wbaa/druid/QueryContextSpec.scala index add7814..87c71ec 100644 --- a/src/test/scala/ing/wbaa/druid/QueryContextSpec.scala +++ b/src/test/scala/ing/wbaa/druid/QueryContextSpec.scala @@ -23,8 +23,10 @@ import io.circe.syntax._ import org.scalatest._ import org.scalatest.concurrent._ import org.scalatest.time._ +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec -class QueryContextSpec extends WordSpec with Matchers with ScalaFutures { +class QueryContextSpec extends AnyWordSpec with Matchers with ScalaFutures { implicit override val patienceConfig = PatienceConfig(timeout = Span(20, Seconds), interval = Span(5, Millis)) diff --git a/src/test/scala/ing/wbaa/druid/SQLQuerySpec.scala b/src/test/scala/ing/wbaa/druid/SQLQuerySpec.scala index 9fa28c8..ccc280c 100644 --- a/src/test/scala/ing/wbaa/druid/SQLQuerySpec.scala +++ b/src/test/scala/ing/wbaa/druid/SQLQuerySpec.scala @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package ing.wbaa.druid import java.time.{ LocalDateTime, ZonedDateTime } @@ -5,13 +22,14 @@ import java.time.{ LocalDateTime, ZonedDateTime } import akka.stream.scaladsl.Sink import org.scalatest.concurrent.ScalaFutures import org.scalatest.time.{ Millis, Seconds, Span } -import org.scalatest.{ Matchers, WordSpec } import ing.wbaa.druid.SQL._ import ing.wbaa.druid.client.CirceDecoders import io.circe.generic.auto._ +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec //noinspection SqlNoDataSourceInspection -class SQLQuerySpec extends WordSpec with Matchers with ScalaFutures with CirceDecoders { +class SQLQuerySpec extends AnyWordSpec with Matchers with ScalaFutures with CirceDecoders { implicit override val patienceConfig = PatienceConfig(timeout = Span(20, Seconds), interval = Span(5, Millis)) private val totalNumberOfEntries = 39244 diff --git a/src/test/scala/ing/wbaa/druid/auth/basic/BasicAuthenticationSpec.scala b/src/test/scala/ing/wbaa/druid/auth/basic/BasicAuthenticationSpec.scala index 20f74f3..c4d65c3 100644 --- a/src/test/scala/ing/wbaa/druid/auth/basic/BasicAuthenticationSpec.scala +++ b/src/test/scala/ing/wbaa/druid/auth/basic/BasicAuthenticationSpec.scala @@ -27,8 +27,10 @@ import org.scalatest.concurrent._ import scala.concurrent.duration._ import scala.language.postfixOps +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec -class BasicAuthenticationSpec extends WordSpec with Matchers with ScalaFutures { +class BasicAuthenticationSpec extends AnyWordSpec with Matchers with ScalaFutures { override implicit def patienceConfig: PatienceConfig = PatienceConfig(5 minutes, 100 millis) private val totalNumberOfEntries = 39244 diff --git a/src/test/scala/ing/wbaa/druid/definitions/ExtractionFnSpec.scala b/src/test/scala/ing/wbaa/druid/definitions/ExtractionFnSpec.scala index 70a92db..1c1e45f 100644 --- a/src/test/scala/ing/wbaa/druid/definitions/ExtractionFnSpec.scala +++ b/src/test/scala/ing/wbaa/druid/definitions/ExtractionFnSpec.scala @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package ing.wbaa.druid.definitions import ing.wbaa.druid.GroupByQuery @@ -5,12 +22,13 @@ import ing.wbaa.druid.definitions.FilterOperators._ import io.circe.generic.auto._ import io.circe.syntax._ import org.scalatest.concurrent.ScalaFutures -import org.scalatest.{ Matchers, WordSpecLike } import scala.concurrent.duration._ import scala.language.postfixOps +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike -class ExtractionFnSpec extends Matchers with WordSpecLike with ScalaFutures { +class ExtractionFnSpec extends Matchers with AnyWordSpecLike with ScalaFutures { override implicit def patienceConfig: PatienceConfig = PatienceConfig(10 seconds, 100 millis) diff --git a/src/test/scala/ing/wbaa/druid/definitions/GranularitySpec.scala b/src/test/scala/ing/wbaa/druid/definitions/GranularitySpec.scala index 7d779c5..f5e2b4e 100644 --- a/src/test/scala/ing/wbaa/druid/definitions/GranularitySpec.scala +++ b/src/test/scala/ing/wbaa/druid/definitions/GranularitySpec.scala @@ -1,11 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package ing.wbaa.druid.definitions import org.scalatest._ import io.circe._ import io.circe.syntax._ +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec -class GranularitySpec extends WordSpec with Matchers { +class GranularitySpec extends AnyWordSpec with Matchers { "Granularities" should { "be able to encode to json" in { implicit val granularityEncoder: Encoder[Granularity] = GranularityType.encoder diff --git a/src/test/scala/ing/wbaa/druid/definitions/HavingSpec.scala b/src/test/scala/ing/wbaa/druid/definitions/HavingSpec.scala index 5b356e5..301b9da 100644 --- a/src/test/scala/ing/wbaa/druid/definitions/HavingSpec.scala +++ b/src/test/scala/ing/wbaa/druid/definitions/HavingSpec.scala @@ -1,15 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package ing.wbaa.druid.definitions import ing.wbaa.druid.GroupByQuery import io.circe.generic.auto._ import io.circe.syntax._ import org.scalatest.concurrent.ScalaFutures -import org.scalatest.{ Matchers, WordSpecLike } import scala.concurrent.duration._ import scala.language.postfixOps +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike -class HavingSpec extends Matchers with WordSpecLike with ScalaFutures { +class HavingSpec extends Matchers with AnyWordSpecLike with ScalaFutures { override implicit def patienceConfig: PatienceConfig = PatienceConfig(10 seconds, 100 millis) diff --git a/src/test/scala/ing/wbaa/druid/definitions/PostAggregationSpec.scala b/src/test/scala/ing/wbaa/druid/definitions/PostAggregationSpec.scala index 1b9bc2c..8a16b04 100644 --- a/src/test/scala/ing/wbaa/druid/definitions/PostAggregationSpec.scala +++ b/src/test/scala/ing/wbaa/druid/definitions/PostAggregationSpec.scala @@ -24,12 +24,13 @@ import ing.wbaa.druid.definitions.FilterOperators._ import io.circe.generic.auto._ import io.circe.syntax._ import org.scalatest.concurrent.ScalaFutures -import org.scalatest.{ Matchers, WordSpecLike } import scala.concurrent.duration._ import scala.language.postfixOps +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpecLike -class PostAggregationSpec extends Matchers with WordSpecLike with ScalaFutures { +class PostAggregationSpec extends Matchers with AnyWordSpecLike with ScalaFutures { override implicit def patienceConfig: PatienceConfig = PatienceConfig(10 seconds, 100 millis) diff --git a/src/test/scala/ing/wbaa/druid/dql/DQLSpec.scala b/src/test/scala/ing/wbaa/druid/dql/DQLSpec.scala index 8d2ddb4..4af1222 100644 --- a/src/test/scala/ing/wbaa/druid/dql/DQLSpec.scala +++ b/src/test/scala/ing/wbaa/druid/dql/DQLSpec.scala @@ -21,7 +21,6 @@ import akka.stream.scaladsl.Sink import ing.wbaa.druid.client.DruidHttpClient import ing.wbaa.druid._ import ing.wbaa.druid.definitions._ -import org.scalatest.{ Matchers, WordSpec } import org.scalatest.concurrent._ import ing.wbaa.druid.dql.DSL._ import io.circe.generic.auto._ @@ -29,8 +28,10 @@ import io.circe.syntax._ import scala.concurrent.duration._ import scala.language.postfixOps +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec -class DQLSpec extends WordSpec with Matchers with ScalaFutures { +class DQLSpec extends AnyWordSpec with Matchers with ScalaFutures { override implicit def patienceConfig: PatienceConfig = PatienceConfig(1 minute, 100 millis)