dombizita opened a new pull request, #10898: URL: https://github.com/apache/ozone/pull/10898
## What changes were proposed in this pull request? `TestClientRetryTimeout` is an ordered, per-class suite where each test retrieves the pipeline of a freshly created key. It did it by casting the first stream entry to `RatisBlockOutputStream` and reading the pipeline off its `XceiverClientRatis`. This assumes that entry holds a live `XceiverClient`, but because earlier tests restart datanodes, the key's client may not be initialized yet, so the access throws an NPE. The NPE also skips `key.close()`, causing a secondary `Found 2 leaked objects` failure. In this change the pipeline is retrieved via `keyOutputStream.getLocationInfoList().get(0).getPipeline()` and adds an `@AfterEach` that closes the key properly. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-15996 ## How was this patch tested? Flaky failures without the fix: [org.apache.hadoop.ozone.client.rpc.TestClientRetryTimeout#ALL[master]-10x50-java25](https://github.com/dombizita/ozone/actions/runs/30358895977/job/90274473084) All green with the fix: [org.apache.hadoop.ozone.client.rpc.TestClientRetryTimeout#ALL[HDDS-15996]-10x50-java25](https://github.com/dombizita/ozone/actions/runs/30445806873/job/90556615984) Generated with Clause Opus 4.8 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
