From 991fb7d819c3313f45b0280fdb5f1c1ad4dc3962 Mon Sep 17 00:00:00 2001 From: Larry Safran Date: Fri, 2 Feb 2024 09:27:15 -0800 Subject: [PATCH] Use real value rather than mock for flaky test --- .../src/test/java/io/grpc/testing/integration/RetryTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/interop-testing/src/test/java/io/grpc/testing/integration/RetryTest.java b/interop-testing/src/test/java/io/grpc/testing/integration/RetryTest.java index b6e569b7b3e..a43be22059e 100644 --- a/interop-testing/src/test/java/io/grpc/testing/integration/RetryTest.java +++ b/interop-testing/src/test/java/io/grpc/testing/integration/RetryTest.java @@ -106,6 +106,7 @@ public class RetryTest { public final GrpcCleanupRule cleanupRule = new GrpcCleanupRule(); private final FakeClock fakeClock = new FakeClock(); private TestListener realMockCallListener = new TestListener(); + @SuppressWarnings("unchecked") private ClientCall.Listener mockCallListener = mock(ClientCall.Listener.class, delegatesTo(realMockCallListener)); @@ -546,9 +547,10 @@ public ClientStreamTracer newClientStreamTracer(StreamInfo info, Metadata header assertRetryStatsRecorded(0, 1, 0); } - private class TestListener extends ClientCall.Listener { + private static class TestListener extends ClientCall.Listener { Status status = null; private CountDownLatch closeLatch = new CountDownLatch(1); + @Override public void onClose(Status status, Metadata trailers) { this.status = status;