-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore: deflake metrics test #420
Conversation
//Wait for the emitter to run | ||
Mockito.verify(metricSpy, Mockito.timeout(2000L).atLeastOnce()).emitMetrics(); | ||
AtomicReference<List<Metric>> results = new AtomicReference<>(); | ||
eventuallyTrue(() -> { |
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.
you need to assert on this eventually true
ResultCaptor<List<Metric>> resultMetrics = new ResultCaptor<>(); | ||
doAnswer(resultMetrics).when(metricSpy).collectMetrics(); | ||
|
||
//Wait for the emitter to run | ||
Mockito.verify(metricSpy, Mockito.timeout(2000L).atLeastOnce()).emitMetrics(); |
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.
keeping the mockito verify should be used instead of eventually true. Was it the reset which was clearing things out?
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.
yeah was thinking it's a race between setting up the mock and performing the ipc call. removed the eventually true and just re-ordered things
Code Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 6b480ba |
d184047
to
6b480ba
Compare
Benchmark Results
|
Issue #, if available:
Description of changes:
Attempt to get rid of null pointers showing up in recent test runs for
GIVEN_kernelRunningWithMetricsConfig_WHEN_verifyClientDeviceIdentity_THEN_successMetricEmitted
Why is this change necessary:
How was this change tested:
Any additional information or context required to review the change:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.