services: Remove unused variables

This commit is contained in:
Eric Anderson 2017-03-06 10:38:18 -08:00
parent 0d498fbb95
commit 075b5ecddd
2 changed files with 3 additions and 7 deletions

View File

@ -41,7 +41,6 @@ import static org.mockito.Mockito.when;
import com.google.instrumentation.stats.RpcConstants;
import com.google.instrumentation.stats.StatsManager;
import com.google.instrumentation.stats.View;
import com.google.instrumentation.stats.ViewDescriptor.DistributionViewDescriptor;
import com.google.instrumentation.stats.ViewDescriptor.IntervalViewDescriptor;
import com.google.protobuf.Empty;
@ -52,7 +51,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
@ -61,14 +59,11 @@ import org.mockito.MockitoAnnotations;
public class MonitoringServiceTest {
@Mock private StatsManager statsManager;
@Captor private ArgumentCaptor<StreamObserver<CanonicalRpcStats>> responseObserverCaptor;
private MonitoringService monitoringService;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
View view = mock(View.class);
when(statsManager.getView(any(DistributionViewDescriptor.class)))
.thenReturn(MonitoringUtilTest.DISTRIBUTION_VIEW);
when(statsManager.getView(any(IntervalViewDescriptor.class)))

View File

@ -205,8 +205,9 @@ public class MonitoringUtilTest {
private static final Timestamp END_TIMESTAMP = Timestamp.create(END_SECONDS, END_NANOS);
private static final CensusProto.Timestamp START_TIMESTAMP_PROTO =
CensusProto.Timestamp.newBuilder().setSeconds(START_SECONDS).setNanos(START_NANOS).build();
private static final CensusProto.Timestamp END_TIMESTAMP_PROTO =
CensusProto.Timestamp.newBuilder().setSeconds(END_SECONDS).setNanos(END_NANOS).build();
// TODO(ericgribkoff) Re-enable once getter methods are public in instrumentation.
//private static final CensusProto.Timestamp END_TIMESTAMP_PROTO =
// CensusProto.Timestamp.newBuilder().setSeconds(END_SECONDS).setNanos(END_NANOS).build();
private static final String TAG_KEY = "tag key";
private static final String TAG_VALUE = "tag value";