You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "echonesis (via GitHub)" <gi...@apache.org> on 2026/10/01 06:47:58 UTC
Re: [PR] HDDS-16619. Intermittent failure in TestReconAsPassiveScm.testDatanodeRegistrationAndReports [ozone]
echonesis commented on code in PR #11341:
URL: https://github.com/apache/ozone/pull/11341#discussion_r4152573619
##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconAsPassiveScm.java:
##########
@@ -91,15 +89,22 @@ public void testDatanodeRegistrationAndReports() throws Exception {
PipelineManager reconPipelineManager = reconScm.getPipelineManager();
PipelineManager scmPipelineManager = scm.getPipelineManager();
- LambdaTestUtils.await(60000, 5000,
- () -> (reconPipelineManager.getPipelines().size() >= 4));
-
- // Verify if Recon has all the pipelines from SCM.
- scmPipelineManager.getPipelines().forEach(p -> {
+ // SCM and Recon update their pipeline state asynchronously. Validate the
+ // complete SCM snapshot inside the retry loop so a pipeline created after
+ // Recon reaches the expected count does not cause a one-shot failure.
+ LambdaTestUtils.await(60000, 5000, () -> {
+ if (scmPipelineManager.getPipelines().size() < 4) {
+ return false;
+ }
try {
- assertNotNull(reconPipelineManager.getPipeline(p.getId()));
+ for (Pipeline pipeline : scmPipelineManager.getPipelines()) {
Review Comment:
Could we capture `scmPipelineManager.getPipelines()` once per retry and use that list for both the size check and iteration? Each call returns a separate snapshot, so this would keep the two checks consistent with the “complete SCM snapshot” comment.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org