Skip to content

Commit 5bae984

Browse files
authored
services: remove no-op call in reflection service test
Now that the fix for grpc#2444 is in, there's no need for the initial noop call.
1 parent 40bc502 commit 5bae984

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

services/src/test/java/io/grpc/protobuf/service/ProtoReflectionServiceTest.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@
7676
import java.util.HashSet;
7777
import java.util.List;
7878
import java.util.Set;
79-
import java.util.concurrent.CountDownLatch;
80-
import java.util.concurrent.TimeUnit;
8179

8280
/**
8381
* Tests for {@link ProtoReflectionService}.
@@ -109,10 +107,6 @@ public void setUp() throws Exception {
109107
.directExecutor()
110108
.build();
111109
stub = ServerReflectionGrpc.newStub(channel);
112-
113-
// TODO(ericgribkoff) Remove after fix for https://github.com/grpc/grpc-java/issues/2444 is
114-
// merged.
115-
doNoOpCall();
116110
}
117111

118112
@After
@@ -606,31 +600,4 @@ private void assertServiceResponseEquals(Set<ServiceResponse> goldenResponse) th
606600
assertEquals(goldenResponse.size(), response.size());
607601
assertEquals(goldenResponse, new HashSet<ServiceResponse>(response));
608602
}
609-
610-
// TODO(ericgribkoff) Remove after fix for https://github.com/grpc/grpc-java/issues/2444 is
611-
// merged.
612-
private void doNoOpCall() throws Exception {
613-
final CountDownLatch latch = new CountDownLatch(1);
614-
ServerReflectionRequest request =
615-
ServerReflectionRequest.newBuilder().setHost(TEST_HOST).setListServices("services").build();
616-
StreamObserver<ServerReflectionRequest> requestObserver =
617-
stub.serverReflectionInfo(new StreamObserver<ServerReflectionResponse>() {
618-
@Override
619-
public void onNext(ServerReflectionResponse value) {
620-
}
621-
622-
@Override
623-
public void onError(Throwable t) {
624-
latch.countDown();
625-
}
626-
627-
@Override
628-
public void onCompleted() {
629-
latch.countDown();
630-
}
631-
});
632-
requestObserver.onNext(request);
633-
requestObserver.onCompleted();
634-
assertTrue(latch.await(5, TimeUnit.SECONDS));
635-
}
636603
}

0 commit comments

Comments
 (0)