Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Aug 28, 2022
1 parent 494261c commit 7d44e8b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ private static void verifyHttpClientPreAggregatedMetrics(List<Envelope> metrics)
validateMetricData("client", md3, "500");
}

private static void verifyHttpServerPreAggregatedMetrics(List<Envelope> metrics)
throws Exception {
private static void verifyHttpServerPreAggregatedMetrics(List<Envelope> metrics) {
assertThat(metrics.size()).isEqualTo(1);
// 1st pre-aggregated metric
Envelope envelope1 = metrics.get(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"instance": "testroleinstance"
},
"preview": {
"metricIntervalSeconds": 10
"metricIntervalSeconds": 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,17 @@ private void waitForHealthCheckTelemetry(String contextRootUrl)
},
TELEMETRY_RECEIVE_TIMEOUT_SECONDS,
TimeUnit.SECONDS);
mockedIngestion.waitForItem(
input -> {
if (!"MetricData".equals(input.getData().getBaseType())) {
return false;
}
MetricData data = (MetricData) ((Data<?>) input.getData()).getBaseData();
String metricId = data.getProperties().get("_MS.MetricId");
return metricId != null && metricId.equals("requests/duration");
},
10, // metrics should come in pretty quickly after spans
TimeUnit.SECONDS);
System.out.printf(
"Received request telemetry after %.3f seconds...%n",
receivedTelemetryTimer.elapsed(TimeUnit.MILLISECONDS) / 1000.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class SmokeTestExtensionBuilder {
private GenericContainer<?> dependencyContainer;
private String dependencyContainerEnvVarName;
private boolean usesGlobalIngestionEndpoint;
private boolean skipHealthCheck = true;
private boolean skipHealthCheck;
private boolean readOnly;

public SmokeTestExtensionBuilder setDependencyContainer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
},
"sampling": {
"percentage": 100
},
"preview": {
"metricIntervalSeconds": 1
}
}

0 comments on commit 7d44e8b

Please sign in to comment.