arunsarin85 opened a new pull request, #10116: URL: https://github.com/apache/ozone/pull/10116
## What changes were proposed in this pull request? TestReconContainerEndpoint#testContainerEndpointForOBSBucket was failing intermittently with AssertionFailedError: expected: <1> but was: <0> on KeysResponse#getTotalCount() (Recon’s container-key index had no entry yet, or the wrong container was queried). Please describe your PR in detail: This change stabilizes the integration test without altering production code: - Reset container-key mapper static state ContainerKeyMapperHelper keeps JVM-wide static state (initialization flag, shared count maps, active task counter). After testContainerEndpointForFSOLayout runs, that state could still reflect the previous cluster and break mapper behavior for the next method. The test now calls ContainerKeyMapperHelper.clearSharedContainerCountMap() at the start of each run (@BeforeEach) and again in a finally block in @AfterEach so cleanup runs even if shutdown throws. - Surface failures from the async “buffer empty” wait The test waited on completableFuture::isDone after waitForEventBufferEmpty but never checked completion. If the async runnable failed, the future could still be “done” and the test would continue. It now calls completableFuture.join() after the wait so failures propagate. - Short settle time after the buffer wait The OM event queue can be empty while a batch is still being processed (events are dequeued before task processing finishes). A two-second sleep after join() gives in-flight container-key updates time to land before assertions. - Resolve the container ID from OM testContainerEndpointForOBSBucket no longer assumes container 1L. It uses OmKeyArgs + OzoneManager#lookupKey to read the real container ID from the key’s block locations (getContainerIdForKey helper). The FSO test uses the same buffer wait / join() / sleep pattern so both methods behave consistently after OM sync. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-15004 ## How was this patch tested? (Please explain how this patch was tested. Ex: unit tests, manual tests, workflow run on the fork git repo.) (If this patch involves UI changes, please attach a screenshot; otherwise, remove this.) https://github.com/arunsarin85/ozone/actions/runs/24855010484 https://github.com/arunsarin85/ozone/actions/runs/24855051641 -- 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]
