From 92a0577ba6d2dbb5c43a9a99433f3efa78cccdc7 Mon Sep 17 00:00:00 2001 From: Laglangyue <35491928+laglangyue@users.noreply.github.com> Date: Sat, 13 Apr 2024 15:30:28 +0800 Subject: [PATCH] Investigate a frequently flaky CI failure in GrpcExceptionHandlerSpec (#293) * Investigate a frequently flaky CI failure in GrpcExceptionHandlerSpec * update doc --- docs/src/main/paradox/server/details.md | 4 ++-- ...lerSpec.scala => GrpcExceptionDefaultHandleSpec.scala} | 4 ++-- .../pekko/grpc/scaladsl/GrpcExceptionHandlerSpec.scala | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) rename interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/{GrpcExceptionHandlerSpec.scala => GrpcExceptionDefaultHandleSpec.scala} (98%) diff --git a/docs/src/main/paradox/server/details.md b/docs/src/main/paradox/server/details.md index f3f47342..6c979919 100644 --- a/docs/src/main/paradox/server/details.md +++ b/docs/src/main/paradox/server/details.md @@ -30,7 +30,7 @@ For an overview of gRPC status codes and their meaning see [statuscodes.md](http For unary responses: Scala -: @@snip[GrpcExceptionHandlerSpec](/interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionHandlerSpec.scala) { #unary } +: @@snip[GrpcExceptionDefaultHandleSpec](/interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionDefaultHandleSpec.scala) { #unary } Java : @@snip[ExceptionGreeterServiceImpl](/interop-tests/src/test/java/example/myapp/helloworld/grpc/ExceptionGreeterServiceImpl.java) { #unary } @@ -38,7 +38,7 @@ Java For streaming responses: Scala -: @@snip[GrpcExceptionHandlerSpec](/interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionHandlerSpec.scala) { #streaming } +: @@snip[GrpcExceptionDefaultHandleSpec](/interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionDefaultHandleSpec.scala) { #streaming } Java : @@snip[ExceptionGreeterServiceImpl](/interop-tests/src/test/java/example/myapp/helloworld/grpc/ExceptionGreeterServiceImpl.java) { #streaming } diff --git a/interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionHandlerSpec.scala b/interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionDefaultHandleSpec.scala similarity index 98% rename from interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionHandlerSpec.scala rename to interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionDefaultHandleSpec.scala index 3741768a..2d84893f 100644 --- a/interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionHandlerSpec.scala +++ b/interop-tests/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionDefaultHandleSpec.scala @@ -31,8 +31,8 @@ import org.scalatest.wordspec.AnyWordSpecLike import scala.concurrent.{ ExecutionContext, Future } -class GrpcExceptionHandlerSpec - extends TestKit(ActorSystem("GrpcExceptionHandlerSpec")) +class GrpcExceptionDefaultHandleSpec + extends TestKit(ActorSystem("GrpcExceptionDefaultHandleSpec")) with AnyWordSpecLike with Matchers with ScalaFutures { diff --git a/runtime/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionHandlerSpec.scala b/runtime/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionHandlerSpec.scala index 7da9d95e..92936b04 100644 --- a/runtime/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionHandlerSpec.scala +++ b/runtime/src/test/scala/org/apache/pekko/grpc/scaladsl/GrpcExceptionHandlerSpec.scala @@ -48,10 +48,10 @@ class GrpcExceptionHandlerSpec extends AnyWordSpec with Matchers with ScalaFutur val otherTypes: Seq[Throwable] = Seq( new GrpcServiceException(status = Status.DEADLINE_EXCEEDED), - new NotImplementedError, - new UnsupportedOperationException, - new NullPointerException, - new RuntimeException, + new NotImplementedError(), + new UnsupportedOperationException(), + new NullPointerException(), + new RuntimeException(), new StatusRuntimeException(io.grpc.Status.DEADLINE_EXCEEDED)) val executionExceptions: Seq[Throwable] =