Conversation
…eRegistrationAndReports
| } | ||
| } | ||
| return true; | ||
| } catch (PipelineNotFoundException e) { |
There was a problem hiding this comment.
Could we fetch the SCM pipelines once per attempt and let LambdaTestUtils.await handle PipelineNotFoundException? It already retries exceptions and preserves the last one as the timeout cause. This would remove the try/catch and redundant null check while keeping the missing pipeline ID available when the test times out.
There was a problem hiding this comment.
Thanks, updated as suggested.
| if (scmPipelineManager.getPipelines().size() < 4) { | ||
| return false; | ||
| } | ||
| try { | ||
| assertNotNull(reconPipelineManager.getPipeline(p.getId())); | ||
| for (Pipeline pipeline : scmPipelineManager.getPipelines()) { |
There was a problem hiding this 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.
There was a problem hiding this comment.
Thanks, updated to use one snapshot per retry.
| for (Pipeline pipeline : scmPipelines) { | ||
| reconPipelineManager.getPipeline(pipeline.getId()); | ||
| } |
There was a problem hiding this comment.
this is no-op.
either keep old code with an additional wait for recon pipeline sync:
// TODO: add a wait for recon pipeline sync
scmPipelineManager.getPipelines().forEach(p -> {
try {
assertNotNull(reconPipelineManager.getPipeline(p.getId()));
} catch (PipelineNotFoundException e) {
fail();
}or if it's not easy yo wit for reconPipelineManager up-to-date, do this:
LambdaTestUtils.await(60000, 5000, () -> {
List<Pipeline> scmPipelines = scmPipelineManager.getPipelines();
if (scmPipelines.size() < 4) {
return false;
}
for (Pipeline pipeline : scmPipelines) {
Pipeline p = reconPipelineManager.getPipeline(pipeline.getId());
if (p == null) return false;
}
What changes were proposed in this pull request?
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16619
How was this patch tested?
CI PASS : https://github.com/Russole/ozone/actions/runs/36288823520
flaky test check : https://github.com/Russole/ozone/actions/runs/36305243887