Search in sources :

Example 6 with DeleteLogMetricRequest

use of com.google.logging.v2.DeleteLogMetricRequest in project google-cloud-java by GoogleCloudPlatform.

the class LoggingImplTest method testDeleteMetricAsync.

@Test
public void testDeleteMetricAsync() throws ExecutionException, InterruptedException {
    DeleteLogMetricRequest request = DeleteLogMetricRequest.newBuilder().setMetricName(METRIC_NAME_PB).build();
    ApiFuture<Empty> response = ApiFutures.immediateFuture(Empty.getDefaultInstance());
    EasyMock.expect(loggingRpcMock.delete(request)).andReturn(response);
    EasyMock.replay(rpcFactoryMock, loggingRpcMock);
    logging = options.getService();
    assertTrue(logging.deleteMetricAsync(METRIC_NAME).get());
}
Also used : Empty(com.google.protobuf.Empty) DeleteLogMetricRequest(com.google.logging.v2.DeleteLogMetricRequest) Test(org.junit.Test)

Aggregations

DeleteLogMetricRequest (com.google.logging.v2.DeleteLogMetricRequest)6 Empty (com.google.protobuf.Empty)5 Test (org.junit.Test)5 MetricNameOneof (com.google.logging.v2.MetricNameOneof)1 GeneratedMessageV3 (com.google.protobuf.GeneratedMessageV3)1