diff --git a/.scala-steward.conf b/.scala-steward.conf index 89020c4d55..d3a618711e 100644 --- a/.scala-steward.conf +++ b/.scala-steward.conf @@ -1,10 +1,8 @@ # ignore the following dependencies: # jodd -> hard to update and only used in DateUtilV1 -# gatling-sbt -> doesn't find the gatling libraries anymore after bumping # sbt-scoverage -> version conflict in scala-xml updates.ignore = [ { groupId = "org.jodd", artifactId = "jodd", version = "3.2.7" } - { groupId = "io.gatling", artifactId = "gatling-sbt", version = "2.2.2" } { groupId = "org.scoverage", artifactId = "sbt-scoverage", version = "1.9.3" } ] diff --git a/build.sbt b/build.sbt index b343a6bd12..3808f428e8 100644 --- a/build.sbt +++ b/build.sbt @@ -148,9 +148,9 @@ lazy val webapi: Project = Project(id = "webapi", base = file("webapi")) Test / fork := true, // run tests in a forked JVM Test / testForkedParallel := true, // run tests in parallel Test / parallelExecution := true, // run tests in parallel - libraryDependencies ++= Dependencies.webapiDependencies ++ Dependencies.webapiTestDependencies + Test / libraryDependencies ++= Dependencies.webapiDependencies ++ Dependencies.webapiTestDependencies ) - .enablePlugins(SbtTwirl, JavaAppPackaging, DockerPlugin, GatlingPlugin, JavaAgent, BuildInfoPlugin) + .enablePlugins(SbtTwirl, JavaAppPackaging, DockerPlugin, JavaAgent, BuildInfoPlugin) .settings( name := "webapi", resolvers ++= Seq( @@ -158,9 +158,12 @@ lazy val webapi: Project = Project(id = "webapi", base = file("webapi")) ), libraryDependencies ++= Dependencies.webapiDependencies ++ Dependencies.webapiTestDependencies ++ Dependencies.webapiIntegrationTestDependencies ) + .configs(IntegrationTest) .settings( - inConfig(IntegrationTest)(Defaults.itSettings ++ Defaults.testTasks ++ baseAssemblySettings), - libraryDependencies ++= Dependencies.webapiDependencies ++ Dependencies.webapiIntegrationTestDependencies + inConfig(IntegrationTest) { + Defaults.itSettings ++ Defaults.testTasks ++ baseAssemblySettings + }, + IntegrationTest / libraryDependencies ++= Dependencies.webapiDependencies ++ Dependencies.webapiIntegrationTestDependencies ) .settings( // add needed files to production jar diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 13fe9ae0af..ad9764a831 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -102,13 +102,11 @@ object Dependencies { val xmlunitCore = "org.xmlunit" % "xmlunit-core" % "2.9.0" // test - val akkaHttpTestkit = "com.typesafe.akka" %% "akka-http-testkit" % AkkaHttpVersion // Scala 3 incompatible - val akkaStreamTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % AkkaActorVersion // Scala 3 compatible - val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % AkkaActorVersion // Scala 3 compatible - val gatlingHighcharts = "io.gatling.highcharts" % "gatling-charts-highcharts" % "3.9.0" - val gatlingTestFramework = "io.gatling" % "gatling-test-framework" % "3.9.0" - val scalaTest = "org.scalatest" %% "scalatest" % "3.2.14" // Scala 3 compatible - val testcontainers = "org.testcontainers" % "testcontainers" % "1.17.6" + val akkaHttpTestkit = "com.typesafe.akka" %% "akka-http-testkit" % AkkaHttpVersion // Scala 3 incompatible + val akkaStreamTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % AkkaActorVersion // Scala 3 compatible + val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % AkkaActorVersion // Scala 3 compatible + val scalaTest = "org.scalatest" %% "scalatest" % "3.2.14" // Scala 3 compatible + val testcontainers = "org.testcontainers" % "testcontainers" % "1.17.6" // found/added by the plugin but deleted anyway val commonsLang3 = "org.apache.commons" % "commons-lang3" % "3.12.0" @@ -117,8 +115,6 @@ object Dependencies { akkaHttpTestkit, akkaStreamTestkit, akkaTestkit, - gatlingHighcharts, - gatlingTestFramework, rdf4jClient, scalaTest, testcontainers, diff --git a/project/plugins.sbt b/project/plugins.sbt index ecd6b6ce2f..958220c6ee 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,7 +11,6 @@ addSbtPlugin("io.kamon" % "sbt-aspectj-runner" % "1.1.2") addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.0") addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.6") -addSbtPlugin("io.gatling" % "gatling-sbt" % "4.2.6") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") diff --git a/webapi/src/it/scala/org/knora/webapi/e2e/ExampleE2ESimSpec.scala b/webapi/src/it/scala/org/knora/webapi/e2e/ExampleE2ESimSpec.scala deleted file mode 100644 index d9a06c4c83..0000000000 --- a/webapi/src/it/scala/org/knora/webapi/e2e/ExampleE2ESimSpec.scala +++ /dev/null @@ -1,51 +0,0 @@ -/* -/* - * Copyright © 2021 - 2022 Swiss National Data and Service Center for the Humanities and/or DaSCH Service Platform contributors. - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.knora.webapi.e2e - -import io.gatling.core.Predef._ -import io.gatling.http.Predef._ -import org.knora.webapi.E2ESimSpec -import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject -import org.knora.webapi.tags.E2ETest - -import scala.concurrent.duration._ - -/** - * Example Simulation Scenario: - * - * This simulation scenario accesses the users endpoint with - * 1000 users concurrently. - */ -class ExampleE2ESimSpec extends E2ESimSpec { - - override lazy val rdfDataObjects: Seq[RdfDataObject] = Seq.empty[RdfDataObject] - - val protobolBuilder = http - .baseURL("http://localhost:3333") - - val users = scenario("Users") - .exec( - http("Get all users") - .get("/admin/users") - .check(status.is(200)) - ) - - val injections = Seq(rampUsers(1000) over 5.seconds) - - val assertions = Seq( - global.responseTime.mean.lt(800) - , forAll.failedRequests.count.lt(1) - ) - - setUp( - users.inject(injections).protocols(protobolBuilder) - ).assertions(assertions) - -} - - - */