- */
-package com.lightbend.lagom.javadsl.grpc.interop.test.api.api;
-
-import akka.NotUsed;
-import com.lightbend.lagom.javadsl.api.Descriptor;
-import com.lightbend.lagom.javadsl.api.Service;
-import com.lightbend.lagom.javadsl.api.ServiceCall;
-
-import static com.lightbend.lagom.javadsl.api.Service.named;
-import static com.lightbend.lagom.javadsl.api.Service.pathCall;
-
-/**
- * The Hello service interface.
- *
- * This describes everything that Lagom needs to know about how to serve and consume the
- * HelloService.
- */
-public interface HelloService extends Service {
-
- /** Example: curl http://localhost:9000/api/hello/Alice */
- ServiceCall hello(String id);
-
- default Descriptor descriptor() {
- return named("hello").withCalls(pathCall("/api/hello/:id", this::hello)).withAutoAcl(true);
- }
-}
diff --git a/lagom-interop-test-java/src/main/proto/helloworld.proto b/lagom-interop-test-java/src/main/proto/helloworld.proto
deleted file mode 100644
index 8907f5ab..00000000
--- a/lagom-interop-test-java/src/main/proto/helloworld.proto
+++ /dev/null
@@ -1,21 +0,0 @@
-// #protoSources
-syntax = "proto3";
-
-option java_multiple_files = true;
-option java_package = "com.lightbend.lagom.javadsl.grpc.interop";
-option java_outer_classname = "HelloWorldProto";
-
-package helloworld;
-
-service GreeterService {
- rpc SayHello (HelloRequest) returns (HelloReply) {}
-}
-
-message HelloRequest {
- string name = 1;
-}
-
-message HelloReply {
- string message = 1;
-}
-// #protoSources
\ No newline at end of file
diff --git a/lagom-interop-test-java/src/main/resources/application.conf b/lagom-interop-test-java/src/main/resources/application.conf
deleted file mode 100644
index 1ac795f2..00000000
--- a/lagom-interop-test-java/src/main/resources/application.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-// #service-module
-play.modules.enabled += HelloModule
-// #service-module
-
-// #client-module-java
-// enable the client module
-play.modules.enabled += com.lightbend.lagom.javadsl.grpc.interop.AkkaGrpcClientModule
-// #client-module-java
-
-// #service-client-conf
-akka.grpc.client {
- "helloworld.GreeterService" {
- service-discovery {
- mechanism = "com.lightbend.lagom.internal.registry.DevModeSimpleServiceDiscovery"
- service-name = "helloworld.GreeterService"
- port-name = "https"
- }
-
- deadline = 5s
- connection-attempts = 5
- }
-}
-// #service-client-conf
\ No newline at end of file
diff --git a/lagom-interop-test-java/src/test/java/com/lightbend/lagom/javadsl/grpc/interop/test/HelloServiceTest.java b/lagom-interop-test-java/src/test/java/com/lightbend/lagom/javadsl/grpc/interop/test/HelloServiceTest.java
deleted file mode 100644
index 3cd4aa27..00000000
--- a/lagom-interop-test-java/src/test/java/com/lightbend/lagom/javadsl/grpc/interop/test/HelloServiceTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc.
- */
-package com.lightbend.lagom.javadsl.grpc.interop.test;
-
-import com.lightbend.lagom.javadsl.grpc.interop.GreeterServiceClient;
-import com.lightbend.lagom.javadsl.grpc.interop.HelloReply;
-import com.lightbend.lagom.javadsl.grpc.interop.HelloRequest;
-import com.lightbend.lagom.javadsl.testkit.grpc.AkkaGrpcClientHelpers;
-import com.lightbend.lagom.javadsl.grpc.interop.test.api.api.HelloService;
-import org.junit.Test;
-
-import static com.lightbend.lagom.javadsl.testkit.ServiceTest.defaultSetup;
-import static com.lightbend.lagom.javadsl.testkit.ServiceTest.withServer;
-import static java.util.concurrent.TimeUnit.SECONDS;
-import static org.junit.Assert.assertEquals;
-
-public class HelloServiceTest {
-
- @Test
- public void shouldSayHelloUsingALagomClient() throws Exception {
- withServer(
- defaultSetup(),
- server -> {
- HelloService service = server.client(HelloService.class);
-
- String msg = service.hello("Alice").invoke().toCompletableFuture().get(5, SECONDS);
- assertEquals("Hi Alice!", msg);
- });
- }
-
- @Test
- public void shouldSayHelloUsingGrpc() throws Exception {
- withServer(
- defaultSetup().withSsl(),
- server -> {
- // #managed-client
- AkkaGrpcClientHelpers.withGrpcClient(
- server,
- GreeterServiceClient::create,
- serviceClient -> {
- HelloReply reply =
- serviceClient
- .sayHello(HelloRequest.newBuilder().setName("Steve").build())
- .toCompletableFuture()
- .get(5, SECONDS);
- assertEquals("Hi Steve (gRPC)", reply.getMessage());
- });
- // #managed-client
- });
- }
-
- @Test
- public void shouldSayHelloUsingUnmanagedGrpc() throws Exception {
- withServer(
- defaultSetup().withSsl(),
- server -> {
- // #unmanaged-client
- GreeterServiceClient client =
- AkkaGrpcClientHelpers.grpcClient(server, GreeterServiceClient::create);
- try {
- HelloReply reply =
- client
- .sayHello(HelloRequest.newBuilder().setName("Steve").build())
- .toCompletableFuture()
- .get(5, SECONDS);
- assertEquals("Hi Steve (gRPC)", reply.getMessage());
- } finally {
- client.close().toCompletableFuture().get(5, SECONDS);
- }
- // #unmanaged-client
- });
- }
-}
diff --git a/lagom-interop-test-java/src/test/resources/logback.xml b/lagom-interop-test-java/src/test/resources/logback.xml
deleted file mode 100644
index 697e43dd..00000000
--- a/lagom-interop-test-java/src/test/resources/logback.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
- %date{ISO8601} %-5level %logger - %msg%n
-
-
-
-
-
-
-
-
-
-
diff --git a/lagom-interop-test-scala/src/main/proto/helloworld.proto b/lagom-interop-test-scala/src/main/proto/helloworld.proto
deleted file mode 100644
index 9bf35245..00000000
--- a/lagom-interop-test-scala/src/main/proto/helloworld.proto
+++ /dev/null
@@ -1,21 +0,0 @@
-// #protoSources
-syntax = "proto3";
-
-option java_multiple_files = true;
-option java_package = "com.lightbend.lagom.scaladsl.grpc.interop";
-option java_outer_classname = "HelloWorldProto";
-
-package helloworld;
-
-service GreeterService {
- rpc SayHello (HelloRequest) returns (HelloReply) {}
-}
-
-message HelloRequest {
- string name = 1;
-}
-
-message HelloReply {
- string message = 1;
-}
-// #protoSources
\ No newline at end of file
diff --git a/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloGrpcServiceImpl.scala b/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloGrpcServiceImpl.scala
deleted file mode 100644
index 5954a746..00000000
--- a/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloGrpcServiceImpl.scala
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc.
- */
-// #service-impl
-package com.lightbend.lagom.scaladsl.grpc.interop.test
-
-import scala.concurrent.Future
-
-import akka.actor.ActorSystem
-import com.lightbend.lagom.scaladsl.grpc.interop.helloworld.AbstractGreeterServiceRouter
-import com.lightbend.lagom.scaladsl.grpc.interop.helloworld.HelloReply
-import com.lightbend.lagom.scaladsl.grpc.interop.helloworld.HelloRequest
-
-class HelloGrpcServiceImpl(sys: ActorSystem) extends AbstractGreeterServiceRouter(sys) {
- override def sayHello(in: HelloRequest): Future[HelloReply] =
- Future.successful(HelloReply(s"Hi ${in.name}! (gRPC)"))
-}
-// #service-impl
diff --git a/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloLoader.scala b/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloLoader.scala
deleted file mode 100644
index 9b13c7e0..00000000
--- a/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloLoader.scala
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc.
- */
-package com.lightbend.lagom.scaladsl.grpc.interop.test
-
-import java.time.Duration
-
-import akka.actor.ActorSystem
-import akka.grpc.GrpcClientSettings
-import com.lightbend.lagom.scaladsl.grpc.interop.GreeterService
-import com.lightbend.lagom.scaladsl.grpc.interop.helloworld.GreeterServiceClient
-import com.lightbend.lagom.scaladsl.server._
-import com.softwaremill.macwire._
-import play.api.libs.ws.ahc.AhcWSComponents
-
-import scala.concurrent.ExecutionContextExecutor
-
-abstract class HelloApplication(context: LagomApplicationContext)
- extends LagomApplication(context)
- with AhcWSComponents {
-
- // #service-additional-router
- // Bind the service that this server provides
- override lazy val lagomServer =
- serverFor[HelloService](wire[HelloServiceImpl])
- .additionalRouter(wire[HelloGrpcServiceImpl])
- // #service-additional-router
-
- // #service-client-conf
- // Implicits required by GrpcClientSettings
- private implicit val dispatcher: ExecutionContextExecutor = actorSystem.dispatcher
- private implicit lazy val sys: ActorSystem = actorSystem
-
- private lazy val settings = GrpcClientSettings
- .usingServiceDiscovery(GreeterService.name)
- .withServicePortName("https")
- // response timeout
- .withDeadline(Duration.ofSeconds(5))
- // use a small reconnectionAttempts value to
- // cause a client reload in case of failure
- .withConnectionAttempts(5)
- // #service-client-conf
-
- // #service-client-creation
- lazy val greeterServiceClient: GreeterServiceClient = GreeterServiceClient(settings)
- // #service-client-creation
-
-}
diff --git a/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloService.scala b/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloService.scala
deleted file mode 100644
index 2bd6cc97..00000000
--- a/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloService.scala
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc.
- */
-package com.lightbend.lagom.scaladsl.grpc.interop.test
-
-import akka.NotUsed
-import com.lightbend.lagom.scaladsl.api.Service
-import com.lightbend.lagom.scaladsl.api.ServiceCall
-
-/**
- * The Hello service interface.
- *
- * This describes everything that Lagom needs to know about how to serve and
- * consume the HelloService.
- */
-trait HelloService extends Service {
-
- /**
- * Example: curl http://localhost:9000/api/hello/Alice
- */
- def hello(id: String): ServiceCall[NotUsed, String]
-
- final override def descriptor = {
- import Service._
- named("hello-srvc")
- .withCalls(
- pathCall("/api/hello/:id", hello _),
- )
- .withAutoAcl(true)
- }
-}
diff --git a/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloServiceImpl.scala b/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloServiceImpl.scala
deleted file mode 100644
index 3db70321..00000000
--- a/lagom-interop-test-scala/src/main/scala/com/lightbend/lagom/scaladsl/grpc/interop/test/HelloServiceImpl.scala
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc.
- */
-package com.lightbend.lagom.scaladsl.grpc.interop.test
-
-import com.lightbend.lagom.scaladsl.api.ServiceCall
-
-import scala.concurrent.Future
-
-/**
- * Implementation of the HelloService.
- */
-class HelloServiceImpl() extends HelloService {
-
- override def hello(id: String) = ServiceCall { _ =>
- Future.successful(s"Hi $id!")
- }
-}
diff --git a/lagom-interop-test-scala/src/test/resources/logback.xml b/lagom-interop-test-scala/src/test/resources/logback.xml
deleted file mode 100644
index 697e43dd..00000000
--- a/lagom-interop-test-scala/src/test/resources/logback.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
- %date{ISO8601} %-5level %logger - %msg%n
-
-
-
-
-
-
-
-
-
-
diff --git a/lagom-interop-test-scala/src/test/scala/com/example/hello/impl/HelloServiceSpec.scala b/lagom-interop-test-scala/src/test/scala/com/example/hello/impl/HelloServiceSpec.scala
deleted file mode 100644
index 91c0cec2..00000000
--- a/lagom-interop-test-scala/src/test/scala/com/example/hello/impl/HelloServiceSpec.scala
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc.
- */
-package com.example.hello.impl
-
-import akka.actor.ActorSystem
-import com.lightbend.lagom.scaladsl.grpc.interop.helloworld.GreeterServiceClient
-import com.lightbend.lagom.scaladsl.grpc.interop.helloworld.HelloRequest
-import com.lightbend.lagom.scaladsl.grpc.interop.test.HelloApplication
-import com.lightbend.lagom.scaladsl.grpc.interop.test.HelloService
-import com.lightbend.lagom.scaladsl.server.LocalServiceLocator
-import com.lightbend.lagom.scaladsl.testkit.ServiceTest
-import com.lightbend.lagom.scaladsl.testkit.grpc.AkkaGrpcClientHelpers
-import org.scalatest.BeforeAndAfterAll
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-import org.scalatest.wordspec.AsyncWordSpec
-
-class HelloServiceAsyncSpec extends AsyncWordSpec with Matchers with BeforeAndAfterAll {
-
- private val server: ServiceTest.TestServer[HelloApplication with LocalServiceLocator] = ServiceTest.startServer(
- ServiceTest.defaultSetup.withSsl(true).withCluster(false),
- ) { ctx =>
- new HelloApplication(ctx) with LocalServiceLocator
- }
-
- implicit val sys: ActorSystem = server.actorSystem
- val client: HelloService = server.serviceClient.implement[HelloService]
-
- // #unmanaged-client
- val grpcClient: GreeterServiceClient = AkkaGrpcClientHelpers.grpcClient(
- server,
- GreeterServiceClient.apply,
- )
-
- protected override def afterAll(): Unit = {
- grpcClient.close()
- server.stop()
- }
-
- // #unmanaged-client
-
- "Hello service (Async)" should {
-
- "say hello over HTTP" in {
- client.hello("Alice").invoke().map { answer =>
- answer should ===("Hi Alice!")
- }
- }
-
- // #unmanaged-client
- "say hello over gRPC (unmnanaged client)" in {
- grpcClient
- .sayHello(HelloRequest("Alice"))
- .map {
- _.message should be("Hi Alice! (gRPC)")
- }
- }
- // #unmanaged-client
-
- }
-
-}
-
-class HelloServiceSpec extends AnyWordSpec with Matchers with BeforeAndAfterAll {
-
- private val server: ServiceTest.TestServer[HelloApplication with LocalServiceLocator] = ServiceTest.startServer(
- ServiceTest.defaultSetup.withSsl(true).withCluster(false),
- ) { ctx =>
- new HelloApplication(ctx) with LocalServiceLocator
- }
-
- implicit val sys: ActorSystem = server.actorSystem
- implicit val ctx = server.executionContext
- val client: HelloService = server.serviceClient.implement[HelloService]
-
- protected override def afterAll(): Unit = {
- server.stop()
- }
-
- "Hello service (Sync)" should {
-
- // #managed-client
- "say hello over gRPC (managed client)" in {
- AkkaGrpcClientHelpers.withGrpcClient(server, GreeterServiceClient.apply _) { grpcClient =>
- grpcClient
- .sayHello(HelloRequest("Alice"))
- .map {
- _.message should be("Hi Alice! (gRPC)")
- }
- }
- }
- // #managed-client
-
- }
-
-}
diff --git a/lagom-interop-test-scala/src/test/scala/resources/logback.xml b/lagom-interop-test-scala/src/test/scala/resources/logback.xml
deleted file mode 100644
index 697e43dd..00000000
--- a/lagom-interop-test-scala/src/test/scala/resources/logback.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
- %date{ISO8601} %-5level %logger - %msg%n
-
-
-
-
-
-
-
-
-
-
diff --git a/lagom-interop-test-scala/src/test/scala/scala/com/example/hello/impl/HelloServiceSpec.scala b/lagom-interop-test-scala/src/test/scala/scala/com/example/hello/impl/HelloServiceSpec.scala
deleted file mode 100644
index f0f73148..00000000
--- a/lagom-interop-test-scala/src/test/scala/scala/com/example/hello/impl/HelloServiceSpec.scala
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc.
- */
-package scala.com.example.hello.impl
-
-import akka.actor.ActorSystem
-import com.lightbend.lagom.scaladsl.grpc.interop.helloworld.GreeterServiceClient
-import com.lightbend.lagom.scaladsl.grpc.interop.helloworld.HelloRequest
-import com.lightbend.lagom.scaladsl.grpc.interop.test.HelloApplication
-import com.lightbend.lagom.scaladsl.grpc.interop.test.HelloService
-import com.lightbend.lagom.scaladsl.server.LocalServiceLocator
-import com.lightbend.lagom.scaladsl.testkit.ServiceTest
-import com.lightbend.lagom.scaladsl.testkit.grpc.AkkaGrpcClientHelpers
-import org.scalatest.BeforeAndAfterAll
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AsyncWordSpec
-
-class HelloServiceSpec extends AsyncWordSpec with Matchers with BeforeAndAfterAll {
-
- private val server: ServiceTest.TestServer[HelloApplication with LocalServiceLocator] = ServiceTest.startServer(
- ServiceTest.defaultSetup.withSsl(true),
- ) { ctx =>
- new HelloApplication(ctx) with LocalServiceLocator
- }
-
- implicit val sys: ActorSystem = server.actorSystem
-
- val client: HelloService = server.serviceClient.implement[HelloService]
- val grpcClient: GreeterServiceClient = AkkaGrpcClientHelpers.grpcClient(
- server,
- GreeterServiceClient.apply,
- )
-
- protected override def afterAll(): Unit = {
- grpcClient.close()
- server.stop()
- }
-
- "Hello service" should {
-
- "say hello over HTTP" in {
- client.hello("Alice").invoke().map { answer =>
- answer should ===("Hi Alice!")
- }
- }
-
- "say hello over gRPC" in {
- grpcClient
- .sayHello(HelloRequest("Alice"))
- .map {
- _.message should be("Hi Alice! (gRPC)")
- }
- }
-
- }
-}
diff --git a/lagom-javadsl-grpc-testkit/src/main/java/com/lightbend/lagom/javadsl/testkit/grpc/AkkaGrpcClientHelpers.java b/lagom-javadsl-grpc-testkit/src/main/java/com/lightbend/lagom/javadsl/testkit/grpc/AkkaGrpcClientHelpers.java
deleted file mode 100644
index 428ebcb8..00000000
--- a/lagom-javadsl-grpc-testkit/src/main/java/com/lightbend/lagom/javadsl/testkit/grpc/AkkaGrpcClientHelpers.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc.
- */
-package com.lightbend.lagom.javadsl.testkit.grpc;
-
-import akka.actor.ClassicActorSystemProvider;
-import akka.annotation.ApiMayChange;
-import akka.grpc.GrpcClientSettings;
-import akka.grpc.javadsl.AkkaGrpcClient;
-import akka.japi.function.Function;
-import akka.japi.function.Function2;
-import akka.japi.function.Function3;
-import akka.japi.function.Procedure;
-import com.lightbend.lagom.javadsl.testkit.ServiceTest;
-import scala.concurrent.ExecutionContext;
-
-/** Helpers to test Java Akka gRPC clients with Lagom */
-@ApiMayChange
-public class AkkaGrpcClientHelpers {
-
- /**
- * Builds an AkkaGrpcClient
for the server
run during tests. The
- * server
must run with SSL enabled, otherwise the creation of a client will fail.
- *
- * @param server the ServiceTest.TestServer
started to run the tests on
- * @param clientFactory a factory method as create by the Akka gRPC code generators
- * @param block user code that given a client will execute the test
- * @param
- * @throws IllegalArgumentException if the server
is not setup with SSL enabled
- */
- public static void withGrpcClient(
- ServiceTest.TestServer server,
- // TODO: replace with AkkaGrpcClientFactory
- Function2 clientFactory,
- Procedure block)
- throws Exception {
- Function f =
- t -> {
- block.apply(t);
- return null;
- };
- withGrpcClient(server, clientFactory, f);
- }
-
- /**
- * Builds an AkkaGrpcClient
for the server
run during tests. The
- * server
must run with SSL enabled, otherwise the creation of a client will fail.
- *
- * @param server the ServiceTest.TestServer
started to run the tests on
- * @param clientFactory a factory method as create by the Akka gRPC code generators
- * @param block user code that given a client will execute the test
- * @param
- * @throws IllegalArgumentException if the server
is not setup with SSL enabled
- */
- public static Result withGrpcClient(
- ServiceTest.TestServer server,
- // TODO: replace with AkkaGrpcClientFactory
- Function2 clientFactory,
- Function block)
- throws Exception {
- T grpcClient = null;
- Result result = null;
-
- try {
- grpcClient = grpcClient(server, clientFactory);
- result = block.apply(grpcClient);
- } finally {
- if (grpcClient != null) {
- // TODO: Await until `close` completes (like play-scalatest and play-specs2)
- grpcClient.close();
- }
- }
-
- return result;
- }
-
- /**
- * Builds an AkkaGrpcClient
for the server
run during tests. The
- * server
must run with SSL enabled, otherwise the creation of a client will fail.
- *
- * The returned `client` must be stopped (in an `@AfterAll` method, for example).
- *
- * @param server the ServiceTest.TestServer
started to run the tests on
- * @param clientFactory a factory method as create by the Akka gRPC code generators
- * @param
- * @throws IllegalArgumentException if the server
is not setup with SSL enabled
- */
- public static T grpcClient(
- ServiceTest.TestServer server,
- // TODO: replace with AkkaGrpcClientFactory
- Function2 clientFactory)
- throws Exception {
-
- if (!server.portSsl().isPresent())
- throw new IllegalArgumentException(
- "Creation of a gRPC client is useless. The ServiceTest.TestServer must be setup with SSL enabled.");
-
- int sslPort = server.portSsl().get();
-
- GrpcClientSettings settings =
- GrpcClientSettings.connectToServiceAt("127.0.0.1", sslPort, server.system())
- .withSslContext(server.clientSslContext().get())
- // the authority must match the value of the SSL certificate used in
- // the ServiceTest.TestServer (if/when that changes or is configurable)
- // this value will have to be configurable
- .withOverrideAuthority("localhost");
-
- return clientFactory.apply(settings, server.system());
- }
-}
diff --git a/lagom-scaladsl-grpc-testkit/src/main/scala/com/lightbend/lagom/scaladsl/testkit/grpc/AkkaGrpcClientHelpers.scala b/lagom-scaladsl-grpc-testkit/src/main/scala/com/lightbend/lagom/scaladsl/testkit/grpc/AkkaGrpcClientHelpers.scala
deleted file mode 100644
index cc9760b4..00000000
--- a/lagom-scaladsl-grpc-testkit/src/main/scala/com/lightbend/lagom/scaladsl/testkit/grpc/AkkaGrpcClientHelpers.scala
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc.
- */
-package com.lightbend.lagom.scaladsl.testkit.grpc
-
-import java.util.concurrent.TimeUnit
-
-import scala.concurrent.Await
-import scala.concurrent.duration.Duration
-
-import akka.annotation.ApiMayChange
-import akka.grpc.GrpcClientSettings
-import akka.grpc.scaladsl.AkkaGrpcClient
-
-import com.lightbend.lagom.scaladsl.testkit.ServiceTest
-
-/**
- * Helpers to test Java Akka gRPC clients with Lagom
- */
-@ApiMayChange
-object AkkaGrpcClientHelpers {
-
- /**
- * Builds an `AkkaGrpcClient` for the `server` run during tests. The `server`
- * must run with SSL enabled, otherwise the creation of a client will fail.
- *
- * @param server the `ServiceTest.TestServer` started to run the tests on
- * @param clientFactory a factory method as create by the Akka gRPC code generators
- * @return T the desired grpc client (as generated by the Akka gRPC code generators)
- * @throws IllegalArgumentException if the `server` is not setup with SSL enabled
- */
- def withGrpcClient[T <: AkkaGrpcClient, Q](
- server: ServiceTest.TestServer[_],
- // TODO: replace with AkkaGrpcClientFactory
- clientFactory: GrpcClientSettings => T,
- )(block: T => Q): Q = {
- var client: T = null.asInstanceOf[T]
- try {
- client = grpcClient[T](server, clientFactory)
- block(client)
- } finally {
- if (client != null) {
- Await.result(client.close(), grpcClientCloseTimeout)
- ()
- }
- }
- }
-
- /**
- * Builds an `AkkaGrpcClient` for the `server` run during tests. The `server`
- * must run with SSL enabled, otherwise the creation of a client will fail.
- *
- * The returned `client` must be stopped (in an `afterAll` block, for example).
- *
- * @param server the `ServiceTest.TestServer` started to run the tests on
- * @param clientFactory a factory method as create by the Akka gRPC code generators
- * @return T the desired grpc client (as generated by the Akka gRPC code generators)
- * @throws IllegalArgumentException if the `server` is not setup with SSL enabled
- */
- @throws[IllegalArgumentException]
- def grpcClient[T <: AkkaGrpcClient](
- server: ServiceTest.TestServer[_],
- // TODO: replace with AkkaGrpcClientFactory
- clientFactory: GrpcClientSettings => T,
- ): T = {
-
- if (server.playServer.httpsPort.isEmpty)
- throw new IllegalArgumentException(
- "Creation of a gRPC client is useless. The ServiceTest.TestServer must be setup with SSL enabled.",
- )
-
- val httpsPort = server.playServer.httpsPort.get
-
- val settings = GrpcClientSettings
- .connectToServiceAt("127.0.0.1", httpsPort)(server.actorSystem)
- .withSslContext(server.clientSslContext.get)
- // the authority must match the value of the SSL certificate used in
- // the ServiceTest.TestServer (if/when that changes or is configurable)
- // this value will have to be configurable
- .withOverrideAuthority("localhost")
-
- clientFactory(settings)
- }
-
- /** The close timeout used by gRPC clients. */
- protected def grpcClientCloseTimeout: Duration = Duration(30, TimeUnit.SECONDS)
-
-}
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 0b2686fb..df72845e 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -19,8 +19,7 @@ object Dependencies {
val akkaGrpc = AkkaGrpcBuildInfo.version
val grpc = AkkaGrpcBuildInfo.grpcVersion
- val play = "2.8.17"
- val lagom = "1.6.7"
+ val play = "2.8.17"
val scalaTest = "3.1.4"
val scalaTestPlusPlay = "5.1.0"
@@ -57,9 +56,6 @@ object Dependencies {
val scalaTestPlusPlay = "org.scalatestplus.play" %% "scalatestplus-play" % Versions.scalaTestPlusPlay // Apache V2
- val lagomJavadslTestKit = "com.lightbend.lagom" %% "lagom-javadsl-testkit" % Versions.lagom
- val lagomScaladslTestKit = "com.lightbend.lagom" %% "lagom-scaladsl-testkit" % Versions.lagom
-
val macwire = "com.softwaremill.macwire" %% "macros" % Versions.macwire % "provided"
}