Skip to content

Commit 98b25aa

Browse files
Copilottrask
andcommitted
Remove unreliable dependency check from LiveMetrics test
Co-authored-by: trask <[email protected]>
1 parent b87d603 commit 98b25aa

File tree

1 file changed

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

1 file changed

+2
-3
lines changed

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

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

6060
assertThat(postBodyVerifier.hasExceptionDoc()).isTrue();
6161
assertThat(postBodyVerifier.hasTraceDoc()).isTrue();
62-
assertThat(postBodyVerifier.hasDependency()).isTrue();
6362
assertThat(postBodyVerifier.hasRequest()).isTrue();
6463
}
6564

@@ -143,7 +142,7 @@ private boolean hasDependency(List<MetricPoint> metrics) {
143142
String name = metric.getName();
144143
double value = metric.getValue();
145144
if (name.equals("\\ApplicationInsights\\Dependency Calls/Sec")) {
146-
return value > 0;
145+
return value == 1;
147146
}
148147
}
149148
return false;
@@ -154,7 +153,7 @@ private boolean hasRequest(List<MetricPoint> metrics) {
154153
String name = metric.getName();
155154
double value = metric.getValue();
156155
if (name.equals("\\ApplicationInsights\\Requests/Sec")) {
157-
return value > 0;
156+
return value == 1;
158157
}
159158
}
160159
return false;

0 commit comments

Comments
 (0)