Skip to content

Commit 3501820

Browse files
Copilottrask
andcommitted
Fix flaky LiveMetrics test by making dependency and request checks more robust
Co-authored-by: trask <[email protected]>
1 parent f3a7ab4 commit 3501820

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private boolean hasDependency(List<MetricPoint> metrics) {
143143
String name = metric.getName();
144144
double value = metric.getValue();
145145
if (name.equals("\\ApplicationInsights\\Dependency Calls/Sec")) {
146-
return value == 1;
146+
return value > 0;
147147
}
148148
}
149149
return false;
@@ -154,7 +154,7 @@ private boolean hasRequest(List<MetricPoint> metrics) {
154154
String name = metric.getName();
155155
double value = metric.getValue();
156156
if (name.equals("\\ApplicationInsights\\Requests/Sec")) {
157-
return value == 1;
157+
return value > 0;
158158
}
159159
}
160160
return false;

0 commit comments

Comments
 (0)