-
Notifications
You must be signed in to change notification settings - Fork 207
Fix flaky live metrics smoke test #4275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
.../java/com/microsoft/applicationinsights/smoketest/fakeingestion/MockedQuickPulseServlet.java
Show resolved
Hide resolved
...main/java/com/microsoft/applicationinsights/smoketest/fakeingestion/LiveMetricsVerifier.java
Show resolved
Hide resolved
await().until(mockedIngestion::isReceivingLiveMetrics); | ||
String contextRootUrl = getBaseUrl() + "/"; | ||
HttpHelper.getResponseCodeEnsuringSampled(contextRootUrl); | ||
waitForHealthCheckTelemetry(contextRootUrl); | ||
await() | ||
.untilAsserted( | ||
() -> | ||
assertThat(mockedIngestion.getLiveMetrics().getRequestCount(contextRootUrl)) | ||
.isEqualTo(1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this ensures that live metrics have been sent before resetData is called below
// TODO (trask) need to fix race condition in live metrics | ||
// where sometimes it loses telemetry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working on a separate fix for this in azure-sdk-for-java repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Azure/azure-sdk-for-java#45944
I will test it in a separate PR by removing this catch (after this PR is merged)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for fixing this!
No description provided.