-
Notifications
You must be signed in to change notification settings - Fork 128
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
[FLAKY TEST] Fix codec test causing CI to fail #277
[FLAKY TEST] Fix codec test causing CI to fail #277
Conversation
Closes resource monitor at the end of the tests so that there are no unparked threads. Signed-off-by: John Mazanec <[email protected]>
Signed-off-by: John Mazanec <[email protected]>
@@ -109,7 +109,8 @@ public void testFooter(Codec codec) throws Exception { | |||
doc.add(vectorField); | |||
writer.addDocument(doc); | |||
|
|||
NativeMemoryLoadStrategy.IndexLoadStrategy.initialize(createDisabledResourceWatcherService()); | |||
ResourceWatcherService resourceWatcherService = createDisabledResourceWatcherService(); | |||
NativeMemoryLoadStrategy.IndexLoadStrategy.initialize(resourceWatcherService); |
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.
It seems that the only change in these lines is related to improved code readability, is this correct?
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 did it to be able to close resourceWatcherService at the end.
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.
Oh, I see, that makes sense. Thank you Jack
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.
LGTM! Thanks
Closes resource monitor at the end of the Codec tests so that there are no unparked threads. Signed-off-by: John Mazanec <[email protected]>
Closes resource monitor at the end of the Codec tests so that there are no unparked threads. Signed-off-by: John Mazanec <[email protected]> (cherry picked from commit 18e6e35)
Closes resource monitor at the end of the Codec tests so that there are no unparked threads. Signed-off-by: John Mazanec <[email protected]> (cherry picked from commit 18e6e35)
Closes resource monitor at the end of the Codec tests so that there are no unparked threads. Signed-off-by: John Mazanec <[email protected]> (cherry picked from commit 18e6e35)
Closes resource monitor at the end of the Codec tests so that there are no unparked threads. Signed-off-by: John Mazanec <[email protected]> (cherry picked from commit 18e6e35)
… (opensearch-project#286) Closes resource monitor at the end of the Codec tests so that there are no unparked threads. Signed-off-by: John Mazanec <[email protected]> (cherry picked from commit 18e6e35)
… (opensearch-project#286) Closes resource monitor at the end of the Codec tests so that there are no unparked threads. Signed-off-by: John Mazanec <[email protected]> (cherry picked from commit 18e6e35) Signed-off-by: Martin Gaievski <[email protected]>
Closes resource monitor at the end of the Codec tests so that there are no unparked threads. Signed-off-by: John Mazanec <[email protected]>
… (opensearch-project#286) Closes resource monitor at the end of the Codec tests so that there are no unparked threads. Signed-off-by: John Mazanec <[email protected]> (cherry picked from commit 18e6e35)
Description
CI keeps failing because of our Codec tests: https://github.com/opensearch-project/k-NN/actions/runs/1820922609. It is due to threads leaking. This PR closes a 2 closeables that were causing an issue: IndexLoadStrategy, resourceWatcherService.
CI was able to pass on my fork: https://github.com/jmazanec15/k-NN-1/actions/runs/1821011151.
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.