Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run tests for pekko 1.1 #1362

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -559,24 +559,25 @@ lazy val `kamon-pekko` = (project in file("instrumentation/kamon-pekko"))
`kamon-testkit` % "test"
)

lazy val pekkoHttpVersion = "1.0.0"
lazy val pekkoHttpVersion = "1.1.0+9-5427d0ca-SNAPSHOT"

lazy val `kamon-pekko-http` = (project in file("instrumentation/kamon-pekko-http"))
.enablePlugins(JavaAgent)
.disablePlugins(AssemblyPlugin)
.settings(instrumentationSettings)
.settings(Seq(
resolvers += "Apache Pekko Snapshots" at "https://repository.apache.org/content/groups/snapshots",
crossScalaVersions := Seq(`scala_2.12_version`, `scala_2.13_version`, scala_3_version),
libraryDependencies ++= Seq(
kanelaAgent % "provided",
"org.apache.pekko" %% "pekko-http" % pekkoHttpVersion % "provided",
"org.apache.pekko" %% "pekko-stream" % "1.0.1" % "provided",
"org.apache.pekko" %% "pekko-stream" % "1.1.2" % "provided",
scalatest % "test",
slf4jApi % "test",
slf4jnop % "test",
okHttp % "test",
"org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % "test",
"com.github.pjfanning" %% "pekko-http-json4s" % "2.0.0" % "test",
"com.github.pjfanning" %% "pekko-http-json4s" % "3.0.0" % "test",
"org.json4s" %% "json4s-native" % "4.0.6" % "test",
),
)).dependsOn(`kamon-pekko`, `kamon-testkit` % "test")
Expand All @@ -586,18 +587,19 @@ lazy val `kamon-pekko-grpc` = (project in file("instrumentation/kamon-pekko-grpc
.disablePlugins(AssemblyPlugin)
.settings(instrumentationSettings)
.settings(Seq(
resolvers += "Apache Pekko Snapshots" at "https://repository.apache.org/content/groups/snapshots",
PB.additionalDependencies := Seq.empty,
crossScalaVersions := Seq(`scala_2.12_version`, `scala_2.13_version`, scala_3_version),
libraryDependencies ++= Seq(
kanelaAgent % "provided",

"org.apache.pekko" %% "pekko-http" % pekkoHttpVersion % "provided",
"org.apache.pekko" %% "pekko-stream" % "1.0.1" % "provided",
"org.apache.pekko" %% "pekko-discovery"% "1.0.0" % "provided",
"org.apache.pekko" %% "pekko-stream" % "1.1.2" % "provided",
"org.apache.pekko" %% "pekko-discovery"% "1.1.2" % "provided",

"com.thesamet.scalapb" %% "scalapb-runtime" % "0.11.8" % "provided",
"org.apache.pekko" %% "pekko-grpc-runtime" % "1.0.0" % "provided",
"io.grpc" % "grpc-stub" % "1.43.2" % "provided",
"com.thesamet.scalapb" %% "scalapb-runtime" % "0.11.17" % "provided",
"org.apache.pekko" %% "pekko-grpc-runtime" % "1.1.0-M1" % "provided",
"io.grpc" % "grpc-stub" % "1.68.0" % "provided",


scalatest % "test",
Expand Down
66 changes: 51 additions & 15 deletions instrumentation/kamon-pekko/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,35 @@
inConfig(Compile)(Defaults.compileSettings ++ Seq(
crossScalaVersions := Seq(`scala_2.12_version`, `scala_2.13_version`, scala_3_version)
))
lazy val Pekko1_0Test = config("test-pekko-1.0") extend (Test)
lazy val Pekko1_1Test = config("test-pekko-1.1") extend (Test)

val pekkoVersion = "1.0.1"
libraryDependencies ++= { if(scalaBinaryVersion.value == "2.11") Seq.empty else Seq(
kanelaAgent % "provided",
scalatest % Test,
logbackClassic % Test,
"org.apache.pekko" %% "pekko-actor" % pekkoVersion % "provided,test",
"org.apache.pekko" %% "pekko-testkit" % pekkoVersion % "provided,test",
"org.apache.pekko" %% "pekko-slf4j" % pekkoVersion % "provided,test",
"org.apache.pekko" %% "pekko-remote" % pekkoVersion % "provided,test",
"org.apache.pekko" %% "pekko-cluster" % pekkoVersion % "provided,test",
"org.apache.pekko" %% "pekko-cluster-sharding" % pekkoVersion % "provided,test",
"org.apache.pekko" %% "pekko-protobuf" % pekkoVersion % "provided,test",
"org.apache.pekko" %% "pekko-testkit" % pekkoVersion % Test
)}
val pekko1_0_Version = "1.1.2"
val pekko1_1_Version = "1.0.3"
libraryDependencies ++= {
if (scalaBinaryVersion.value == "2.11") Seq.empty
else Seq(
kanelaAgent % "provided,test,test-pekko-1.0,test-pekko-1.1",
scalatest % "test,test-pekko-1.0,test-pekko-1.1",
logbackClassic % "test,test-pekko-1.0,test-pekko-1.1",
"org.apache.pekko" %% "pekko-actor" % pekko1_0_Version % "provided,test-pekko-1.0",
"org.apache.pekko" %% "pekko-testkit" % pekko1_0_Version % "provided,test-pekko-1.0",
"org.apache.pekko" %% "pekko-slf4j" % pekko1_0_Version % "provided,test-pekko-1.0",
"org.apache.pekko" %% "pekko-remote" % pekko1_0_Version % "provided,test-pekko-1.0",
"org.apache.pekko" %% "pekko-cluster" % pekko1_0_Version % "provided,test-pekko-1.0",
"org.apache.pekko" %% "pekko-cluster-sharding" % pekko1_0_Version % "provided,test-pekko-1.0",
"org.apache.pekko" %% "pekko-protobuf-v3" % pekko1_0_Version % "provided,test-pekko-1.0",
"org.apache.pekko" %% "pekko-testkit" % pekko1_0_Version % "test-pekko-1.0",
"org.apache.pekko" %% "pekko-actor" % pekko1_1_Version % "provided,test-pekko-1.1",
"org.apache.pekko" %% "pekko-testkit" % pekko1_1_Version % "provided,test-pekko-1.1",
"org.apache.pekko" %% "pekko-slf4j" % pekko1_1_Version % "provided,test-pekko-1.1",
"org.apache.pekko" %% "pekko-remote" % pekko1_1_Version % "provided,test-pekko-1.1",
"org.apache.pekko" %% "pekko-cluster" % pekko1_1_Version % "provided,test-pekko-1.1",
"org.apache.pekko" %% "pekko-cluster-sharding" % pekko1_1_Version % "provided,test-pekko-1.1",
"org.apache.pekko" %% "pekko-protobuf-v3" % pekko1_1_Version % "provided,test-pekko-1.1",
"org.apache.pekko" %% "pekko-testkit" % pekko1_1_Version % "test-pekko-1.1"
)
}

exportJars := true

Expand All @@ -33,5 +47,27 @@ lazy val baseTestSettings = Seq(
)

inConfig(Test)(Defaults.testSettings ++ instrumentationSettings ++ baseTestSettings ++ Seq(
crossScalaVersions := Seq(`scala_2.12_version`, `scala_2.13_version`, scala_3_version),
crossScalaVersions := Seq(`scala_2.12_version`, `scala_2.13_version`, scala_3_version)
))

configs(Pekko1_0Test, Pekko1_1Test)
inConfig(Pekko1_0Test)(Defaults.testSettings ++ Seq(
sources := (Test / sources).value,
unmanagedResourceDirectories ++= (Compile / unmanagedResourceDirectories).value,
unmanagedResourceDirectories ++= (Test / unmanagedResourceDirectories).value
))
inConfig(Pekko1_1Test)(Defaults.testSettings ++ Seq(
sources := (Test / sources).value,
unmanagedResourceDirectories ++= (Compile / unmanagedResourceDirectories).value,
unmanagedResourceDirectories ++= (Test / unmanagedResourceDirectories).value
))

Test / test := {
(Pekko1_0Test / test).value
(Pekko1_1Test / test).value
}
Test / testOnly := {
(Pekko1_0Test / testOnly).evaluated

(Pekko1_1Test / testOnly).evaluated
}