Skip to content

Commit

Permalink
Set initialDelay from 0 to 1 to increase the chance getting the metri…
Browse files Browse the repository at this point in the history
…cs on the 1st invocation of Monitoring.postMetricData
  • Loading branch information
klustria committed Mar 14, 2024
1 parent 7a2ff81 commit 445a28d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
value = OciMetricsCdiExtensionTest.MetricDataDetailsOCIParams.namespace)
@AddConfig(key = "ocimetrics.resourceGroup",
value = OciMetricsCdiExtensionTest.MetricDataDetailsOCIParams.resourceGroup)
@AddConfig(key = "ocimetrics.initialDelay", value = "0")
@AddConfig(key = "ocimetrics.initialDelay", value = "1")
@AddConfig(key = "ocimetrics.delay", value = "1")
class OciMetricsCdiExtensionTest {
private static String METRIC_NAME_SUFFIX = "DummyCounter";
Expand Down Expand Up @@ -187,7 +187,6 @@ Monitoring getMockedMonitoring() {
if (method.getName().equals("getEndpoint")) {
return "http://www.DummyEndpoint.com";
} else if (method.getName().equals("postMetricData")) {
// startupMetricLatch.await(5, TimeUnit.SECONDS);
PostMetricDataRequest postMetricDataRequest = (PostMetricDataRequest) args[0];
postMetricDataDetails = postMetricDataRequest.getPostMetricDataDetails();
testMetricCount = (int) postMetricDataDetails.getMetricData().stream()
Expand Down

0 comments on commit 445a28d

Please sign in to comment.