From 91f37bbe505a757f2fcb5ced3b9a644b879fb04b Mon Sep 17 00:00:00 2001 From: Francesco Guardiani Date: Fri, 22 Sep 2023 13:45:45 +0200 Subject: [PATCH] Remove Ingress service hack (#200) --- .../dev/restate/e2e/runtime/IngressServiceTest.kt | 12 +++++------- .../dev/restate/e2e/runtime/KillInvocationTest.kt | 2 +- .../restate/e2e/runtime/RetryOnUnknownServiceTest.kt | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/src/test/kotlin/dev/restate/e2e/runtime/IngressServiceTest.kt b/tests/src/test/kotlin/dev/restate/e2e/runtime/IngressServiceTest.kt index 6db609e1..6f69e18b 100644 --- a/tests/src/test/kotlin/dev/restate/e2e/runtime/IngressServiceTest.kt +++ b/tests/src/test/kotlin/dev/restate/e2e/runtime/IngressServiceTest.kt @@ -5,7 +5,7 @@ import dev.restate.e2e.Utils.jacksonBodyHandler import dev.restate.e2e.Utils.jacksonBodyPublisher import dev.restate.e2e.services.counter.CounterGrpc import dev.restate.e2e.services.counter.CounterGrpc.CounterBlockingStub -import dev.restate.e2e.services.counter.CounterProto +import dev.restate.e2e.services.counter.CounterProto.CounterRequest import dev.restate.e2e.services.counter.counterAddRequest import dev.restate.e2e.utils.InjectBlockingStub import dev.restate.e2e.utils.InjectGrpcIngressURL @@ -17,7 +17,7 @@ import java.net.URI import java.net.URL import java.net.http.HttpClient import java.net.http.HttpRequest -import java.util.UUID +import java.util.* import org.assertj.core.api.Assertions.assertThat import org.awaitility.kotlin.await import org.awaitility.kotlin.matches @@ -72,8 +72,7 @@ class IngressServiceTest { await untilCallTo { - counterClient.get( - CounterProto.CounterRequest.newBuilder().setCounterName(counterName).build()) + counterClient.get(CounterRequest.newBuilder().setCounterName(counterName).build()) } matches { num -> num!!.value == 2L @@ -93,7 +92,7 @@ class IngressServiceTest { invokeRequest { service = CounterGrpc.SERVICE_NAME method = CounterGrpc.getAddMethod().bareMethodName.toString() - argument = + pb = counterAddRequest { counterName = counterRandomName value = 2 @@ -105,8 +104,7 @@ class IngressServiceTest { await untilCallTo { - counterClient.get( - CounterProto.CounterRequest.newBuilder().setCounterName(counterRandomName).build()) + counterClient.get(CounterRequest.newBuilder().setCounterName(counterRandomName).build()) } matches { num -> num!!.value == 2L diff --git a/tests/src/test/kotlin/dev/restate/e2e/runtime/KillInvocationTest.kt b/tests/src/test/kotlin/dev/restate/e2e/runtime/KillInvocationTest.kt index 4ef1f0a5..94f08565 100644 --- a/tests/src/test/kotlin/dev/restate/e2e/runtime/KillInvocationTest.kt +++ b/tests/src/test/kotlin/dev/restate/e2e/runtime/KillInvocationTest.kt @@ -53,7 +53,7 @@ class KillInvocationTest { invokeRequest { service = CounterGrpc.SERVICE_NAME method = CounterGrpc.getInfiniteIncrementLoopMethod().bareMethodName!! - argument = counterRequest.toByteString() + pb = counterRequest.toByteString() }) .id diff --git a/tests/src/test/kotlin/dev/restate/e2e/runtime/RetryOnUnknownServiceTest.kt b/tests/src/test/kotlin/dev/restate/e2e/runtime/RetryOnUnknownServiceTest.kt index e5a00b75..92db2743 100644 --- a/tests/src/test/kotlin/dev/restate/e2e/runtime/RetryOnUnknownServiceTest.kt +++ b/tests/src/test/kotlin/dev/restate/e2e/runtime/RetryOnUnknownServiceTest.kt @@ -107,7 +107,7 @@ class RetryOnUnknownServiceTest { invokeRequest { service = ProxyServiceGrpc.SERVICE_NAME method = methodName - argument = request.toByteString() + pb = request.toByteString() }) // Await until we got a try count of 2