all: Remove unused variables and squelch incorrect ErrorProne warning

This commit is contained in:
Eric Anderson 2017-08-02 14:57:11 -07:00
parent de8b411773
commit c4f91272d2
2 changed files with 4 additions and 7 deletions

View File

@ -60,7 +60,6 @@ final class CensusTracingModule {
private static final ClientStreamTracer noopClientTracer = new ClientStreamTracer() {};
private final Tracer censusTracer;
private final BinaryFormat censusPropagationBinaryFormat;
@VisibleForTesting
final Metadata.Key<SpanContext> tracingHeader;
private final TracingClientInterceptor clientInterceptor = new TracingClientInterceptor();
@ -69,8 +68,7 @@ final class CensusTracingModule {
CensusTracingModule(
Tracer censusTracer, final BinaryFormat censusPropagationBinaryFormat) {
this.censusTracer = checkNotNull(censusTracer, "censusTracer");
this.censusPropagationBinaryFormat =
checkNotNull(censusPropagationBinaryFormat, "censusPropagationBinaryFormat");
checkNotNull(censusPropagationBinaryFormat, "censusPropagationBinaryFormat");
this.tracingHeader =
Metadata.Key.of("grpc-trace-bin", new Metadata.BinaryMarshaller<SpanContext>() {
@Override
@ -187,12 +185,11 @@ final class CensusTracingModule {
@VisibleForTesting
final class ClientCallTracer extends ClientStreamTracer.Factory {
private final String fullMethodName;
private final AtomicBoolean callEnded = new AtomicBoolean(false);
private final Span span;
ClientCallTracer(@Nullable Span parentSpan, String fullMethodName) {
this.fullMethodName = checkNotNull(fullMethodName, "fullMethodName");
checkNotNull(fullMethodName, "fullMethodName");
this.span =
censusTracer
.spanBuilderWithExplicitParent(makeSpanName("Sent", fullMethodName), parentSpan)
@ -222,12 +219,11 @@ final class CensusTracingModule {
}
private final class ServerTracer extends ServerStreamTracer {
private final String fullMethodName;
private final Span span;
private final AtomicBoolean streamClosed = new AtomicBoolean(false);
ServerTracer(String fullMethodName, @Nullable SpanContext remoteSpan) {
this.fullMethodName = checkNotNull(fullMethodName, "fullMethodName");
checkNotNull(fullMethodName, "fullMethodName");
this.span =
censusTracer
.spanBuilderWithRemoteParent(makeSpanName("Recv", fullMethodName), remoteSpan)

View File

@ -1376,6 +1376,7 @@ public abstract class AbstractInteropTest {
}
/** Start a fullDuplexCall which the server will not respond, and verify the deadline expires. */
@SuppressWarnings("MissingFail")
@Test(timeout = 10000)
public void timeoutOnSleepingServer() throws Exception {
TestServiceGrpc.TestServiceStub stub =