Wei-Chiu Chuang created HDDS-15827:
--------------------------------------

             Summary: TestDnRatisLogParser fails when SCM pipeline list is 
still empty after cluster startup
                 Key: HDDS-15827
                 URL: https://issues.apache.org/jira/browse/HDDS-15827
             Project: Apache Ozone
          Issue Type: Bug
          Components: test
            Reporter: Wei-Chiu Chuang


{{TestDnRatisLogParser.testRatisLogParsing}} starts a single-datanode 
mini-cluster, calls {{{}waitForClusterToBeReady(){}}}, then immediately 
executes:

 
 
{code:java}
 cluster.getStorageContainerManager().getPipelineManager()   
.getPipelines().get(0) {code}
 
 
Pipeline creation can lag behind cluster readiness. When the pipeline list is 
still empty, the test fails with:
IndexOutOfBoundsException: Index 0 out of bounds for length 0
Observed in CI ({{{}integration (ozone){}}} shard), e.g. GitHub Actions run on 
fork CI.

Steps to reproduce:
 # Run {{mvn -pl :ozone-integration-test test -Dtest=TestDnRatisLogParser 
-DskipShade -DskipRecon -DskipDocs}} repeatedly, or run in CI under load.
 # Test may fail before the ratis log file wait if no pipeline exists yet.

Expected: Test waits until at least one pipeline exists (similar to existing 
wait for {{{}log_inprogress_0{}}}).

Actual: Immediate index into an empty pipeline list.

Proposed fix: Add {{GenericTestUtils.waitFor()}} until {{getPipelines()}} is 
non-empty before accessing index 0.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to