use of com.google.cloud.logging.Metric in project google-cloud-java by GoogleCloudPlatform.
the class ITMetricSnippets method testMetric.
@Test
public void testMetric() throws InterruptedException, ExecutionException {
Metric metric = metricSnippets.reload();
assertNotNull(metric);
Metric updatedMetric = metricSnippets.update();
assertEquals(UPDATED_DESCRIPTION, updatedMetric.getDescription());
updatedMetric = metricSnippets.reloadAsync();
assertNotNull(updatedMetric);
assertEquals(UPDATED_DESCRIPTION, updatedMetric.getDescription());
metric.update();
updatedMetric = metricSnippets.updateAsync();
assertEquals(UPDATED_DESCRIPTION, updatedMetric.getDescription());
assertTrue(metricSnippets.delete());
assertFalse(metricSnippets.deleteAsync());
}
Aggregations