-
Notifications
You must be signed in to change notification settings - Fork 207
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
Mockito 5 #4712
Mockito 5 #4712
Conversation
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 for providing the change. To me, the main thing with that change is, that all builds and tests should be successful after merge. Unfortunately, the Gradle builds are failing as are some of the tests. Would be nice to see them in green to validate this change.
Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: David Venable <dlv@amazon.com>
…cs. Updates to MetricsTestUtil to provide clarity on NPEs. Signed-off-by: David Venable <dlv@amazon.com>
Yes, I agree with getting the tests to green. I found some issues and resolved them. Now the tests are mostly to green. There are enough flaky tests to where I've not had all successful runs. Also, the |
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.
Great to see the tests are green now. There are three places, where the tests now only consist of Mockito configuration without any directly apparent call to production code. Not sure, whether this can be improved.
...test/java/org/opensearch/dataprepper/peerforwarder/discovery/StaticPeerListProviderTest.java
Show resolved
Hide resolved
...rc/test/java/org/opensearch/dataprepper/peerforwarder/discovery/DnsPeerListProviderTest.java
Show resolved
Hide resolved
...rc/test/java/org/opensearch/dataprepper/peerforwarder/discovery/DnsPeerListProviderTest.java
Show resolved
Hide resolved
Yes, me too! We still have a number of flaky tests. I created #4723 to resolve a flaky test in the new AWS Lambda sink. This one was failing 18 out of 20 times when I locally set it to be a |
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 think, this is fine to go.
Mockito 5 * Synchronize the MetricsTestUtil methods to avoid test failures. * Create a copy of the collections to remove in MetricsTestUtil. * Updated two tests to JUnit 5 and to use mocks instead of actual metrics. Updates to MetricsTestUtil to provide clarity on NPEs. Signed-off-by: David Venable <dlv@amazon.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Mockito 5 * Synchronize the MetricsTestUtil methods to avoid test failures. * Create a copy of the collections to remove in MetricsTestUtil. * Updated two tests to JUnit 5 and to use mocks instead of actual metrics. Updates to MetricsTestUtil to provide clarity on NPEs. Signed-off-by: David Venable <dlv@amazon.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Mockito 5 * Synchronize the MetricsTestUtil methods to avoid test failures. * Create a copy of the collections to remove in MetricsTestUtil. * Updated two tests to JUnit 5 and to use mocks instead of actual metrics. Updates to MetricsTestUtil to provide clarity on NPEs. Signed-off-by: David Venable <dlv@amazon.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Mockito 5 * Synchronize the MetricsTestUtil methods to avoid test failures. * Create a copy of the collections to remove in MetricsTestUtil. * Updated two tests to JUnit 5 and to use mocks instead of actual metrics. Updates to MetricsTestUtil to provide clarity on NPEs. Signed-off-by: David Venable <dlv@amazon.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Mockito 5 * Synchronize the MetricsTestUtil methods to avoid test failures. * Create a copy of the collections to remove in MetricsTestUtil. * Updated two tests to JUnit 5 and to use mocks instead of actual metrics. Updates to MetricsTestUtil to provide clarity on NPEs. Signed-off-by: David Venable <dlv@amazon.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Mockito 5 * Synchronize the MetricsTestUtil methods to avoid test failures. * Create a copy of the collections to remove in MetricsTestUtil. * Updated two tests to JUnit 5 and to use mocks instead of actual metrics. Updates to MetricsTestUtil to provide clarity on NPEs. Signed-off-by: David Venable <dlv@amazon.com> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Description
Use Mockito 5.
mockito-inline
project as this is now the defaultorg.mockito.plugins.MockMaker
files since inline is now the defaultIssues Resolved
N/A
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.