Skip to content

HDDS-15827. Wait for SCM pipelines in TestDnRatisLogParser#10724

Closed
jojochuang wants to merge 1 commit into
apache:masterfrom
jojochuang:HDDS-15822-fix-dn-ratis-log-parser-test
Closed

HDDS-15827. Wait for SCM pipelines in TestDnRatisLogParser#10724
jojochuang wants to merge 1 commit into
apache:masterfrom
jojochuang:HDDS-15822-fix-dn-ratis-log-parser-test

Conversation

@jojochuang

@jojochuang jojochuang commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wait for SCM to report at least one pipeline before TestDnRatisLogParser reads getPipelines().get(0).
  • Avoids intermittent IndexOutOfBoundsException: Index 0 out of bounds for length 0 when pipeline creation lags behind waitForClusterToBeReady().

Jira

https://issues.apache.org/jira/browse/HDDS-15827

Problem

testRatisLogParsing uses a single-datanode mini-cluster and immediately indexes the first SCM pipeline. In CI, the pipeline list can still be empty when the test runs, even though the cluster is marked ready.

Test plan

  • checkstyle on ozone-integration-test module
  • mvn -pl :ozone-integration-test test -Dtest=TestDnRatisLogParser -DskipShade -DskipRecon -DskipDocs

Copilot AI review requested due to automatic review settings July 10, 2026 22:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the TestDnRatisLogParser integration test by waiting for SCM to report at least one pipeline before indexing getPipelines().get(0), addressing intermittent IndexOutOfBoundsException failures when pipeline creation lags behind cluster readiness.

Changes:

  • Add a GenericTestUtils.waitFor(...) gate to ensure SCM pipeline list is non-empty before accessing the first pipeline.
  • Reduce test flakiness in single-datanode mini-cluster runs where pipeline creation can be delayed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jojochuang jojochuang changed the title HDDS-15822. Wait for SCM pipelines in TestDnRatisLogParser Wait for SCM pipelines in TestDnRatisLogParser Jul 10, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
Change-Id: I5849809e940c04cb6432a552f96ababa8db58251
@jojochuang jojochuang force-pushed the HDDS-15822-fix-dn-ratis-log-parser-test branch from 2df421e to 2ee0593 Compare July 10, 2026 22:22
@jojochuang jojochuang closed this Jul 10, 2026
@jojochuang jojochuang deleted the HDDS-15822-fix-dn-ratis-log-parser-test branch July 10, 2026 22:22
@jojochuang jojochuang changed the title Wait for SCM pipelines in TestDnRatisLogParser HDDS-15827. Wait for SCM pipelines in TestDnRatisLogParser Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants