Skip to content

Commit 4b76a9b

Browse files
committed
make pekko test code more scala 3 friendly
1 parent f6f1d28 commit 4b76a9b

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

instrumentation/pekko/pekko-http-1.0/javaagent/src/test/scala/io/opentelemetry/javaagent/instrumentation/pekkohttp/v1_0/PekkoHttpClientInstrumentationTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ class PekkoHttpClientInstrumentationTest
4343
HttpClientInstrumentationExtension.forAgent()
4444

4545
val system: ActorSystem = ActorSystem.create()
46-
implicit val materializer: ActorMaterializer =
47-
ActorMaterializer.create(system)
46+
val materializer: ActorMaterializer = ActorMaterializer.create(system)
4847

4948
override def buildRequest(
5049
method: String,

instrumentation/pekko/pekko-http-1.0/javaagent/src/test/scala/io/opentelemetry/javaagent/instrumentation/pekkohttp/v1_0/PekkoHttpTestServerSourceWebServer.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ import org.apache.pekko.http.scaladsl.server.Directives._
1616
import org.apache.pekko.stream.ActorMaterializer
1717
import org.apache.pekko.stream.scaladsl.Sink
1818

19-
import scala.concurrent.Await
19+
import scala.concurrent.{Await, ExecutionContext}
2020

2121
object PekkoHttpTestServerSourceWebServer {
22-
implicit val system = ActorSystem("my-system")
23-
implicit val materializer = ActorMaterializer()
22+
implicit val system: ActorSystem = ActorSystem("my-system")
23+
implicit val materializer: ActorMaterializer = ActorMaterializer()
2424
// needed for the future flatMap/onComplete in the end
25-
implicit val executionContext = system.dispatcher
25+
implicit val executionContext: ExecutionContext = system.dispatcher
2626

2727
var route = get {
2828
concat(

instrumentation/pekko/pekko-http-1.0/javaagent/src/test/scala/io/opentelemetry/javaagent/instrumentation/pekkohttp/v1_0/PekkoHttpTestSyncWebServer.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import io.opentelemetry.instrumentation.testing.junit.http.{
1818
import io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint._
1919

2020
import java.util.function.Supplier
21-
import scala.concurrent.Await
21+
import scala.concurrent.{Await, ExecutionContext}
2222

2323
object PekkoHttpTestSyncWebServer {
24-
implicit val system = ActorSystem("my-system")
24+
implicit val system: ActorSystem = ActorSystem("my-system")
2525
implicit val materializer = ActorMaterializer()
2626
// needed for the future flatMap/onComplete in the end
27-
implicit val executionContext = system.dispatcher
27+
implicit val executionContext: ExecutionContext = system.dispatcher
2828
val syncHandler: HttpRequest => HttpResponse = {
2929
case HttpRequest(GET, uri: Uri, _, _, _) => {
3030
val endpoint = ServerEndpoint.forPath(uri.path.toString())

instrumentation/pekko/pekko-http-1.0/javaagent/src/test/scala/io/opentelemetry/javaagent/instrumentation/pekkohttp/v1_0/PekkoHttpTestWebServer.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ import org.apache.pekko.http.scaladsl.model.StatusCodes.Found
1515
import org.apache.pekko.http.scaladsl.server.Directives._
1616
import org.apache.pekko.stream.ActorMaterializer
1717

18-
import scala.concurrent.Await
18+
import scala.concurrent.{Await, ExecutionContext}
1919

2020
object PekkoHttpTestWebServer {
21-
implicit val system = ActorSystem("my-system")
21+
implicit val system: ActorSystem = ActorSystem("my-system")
2222
implicit val materializer = ActorMaterializer()
2323
// needed for the future flatMap/onComplete in the end
24-
implicit val executionContext = system.dispatcher
24+
implicit val executionContext: ExecutionContext = system.dispatcher
2525

2626
var route = get {
2727
concat(

0 commit comments

Comments
 (0)