Skip to content

Commit 8ae8c98

Browse files
committed
Remove workaround for live metrics race condition
1 parent 53d073b commit 8ae8c98

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

smoke-tests/framework/src/main/java/com/microsoft/applicationinsights/smoketest/SmokeTestExtension.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import java.util.function.Predicate;
4040
import java.util.stream.Collectors;
4141
import javax.annotation.Nullable;
42-
import org.awaitility.core.ConditionTimeoutException;
4342
import org.junit.jupiter.api.extension.AfterAllCallback;
4443
import org.junit.jupiter.api.extension.AfterEachCallback;
4544
import org.junit.jupiter.api.extension.BeforeAllCallback;
@@ -290,16 +289,11 @@ private void clearOutAnyInitLogs() throws Exception {
290289
HttpHelper.getResponseCodeEnsuringSampled(contextRootUrl);
291290
waitForHealthCheckTelemetry(contextRootUrl);
292291
if (!useOld3xAgent) {
293-
try {
294-
await()
295-
.untilAsserted(
296-
() ->
297-
assertThat(mockedIngestion.getLiveMetrics().getRequestCount(contextRootUrl))
298-
.isEqualTo(1));
299-
} catch (ConditionTimeoutException e) {
300-
// TODO (trask) need to fix race condition in live metrics
301-
// where sometimes it loses telemetry
302-
}
292+
await()
293+
.untilAsserted(
294+
() ->
295+
assertThat(mockedIngestion.getLiveMetrics().getRequestCount(contextRootUrl))
296+
.isEqualTo(1));
303297
}
304298
System.out.println("Clearing any RequestData from health check.");
305299
mockedIngestion.resetData();

0 commit comments

Comments
 (0)