Skip to content

Commit ed49b91

Browse files
Copilottrask
andcommitted
Restore dependency assertion with robust check for internal spans
Co-authored-by: trask <[email protected]>
1 parent 98b25aa commit ed49b91

File tree

1 file changed

+2
-1
lines changed
  • smoke-tests/apps/LiveMetrics/src/smokeTest/java/com/microsoft/applicationinsights/smoketest

1 file changed

+2
-1
lines changed

smoke-tests/apps/LiveMetrics/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/LiveMetricsTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ void testTelemetryDataFlow() throws java.lang.Exception {
5959

6060
assertThat(postBodyVerifier.hasExceptionDoc()).isTrue();
6161
assertThat(postBodyVerifier.hasTraceDoc()).isTrue();
62+
assertThat(postBodyVerifier.hasDependency()).isTrue();
6263
assertThat(postBodyVerifier.hasRequest()).isTrue();
6364
}
6465

@@ -142,7 +143,7 @@ private boolean hasDependency(List<MetricPoint> metrics) {
142143
String name = metric.getName();
143144
double value = metric.getValue();
144145
if (name.equals("\\ApplicationInsights\\Dependency Calls/Sec")) {
145-
return value == 1;
146+
return value > 0;
146147
}
147148
}
148149
return false;

0 commit comments

Comments
 (0)