[ 
https://issues.apache.org/jira/browse/HDDS-17027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-17027:
----------------------------------
    Labels: pull-request-available  (was: )

> Intermittent failure in 
> TestReplicationSupervisor#testReconciliationTaskMetrics
> -------------------------------------------------------------------------------
>
>                 Key: HDDS-17027
>                 URL: https://issues.apache.org/jira/browse/HDDS-17027
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: Ozone Datanode, test
>            Reporter: Siyao Meng
>            Assignee: Siyao Meng
>            Priority: Major
>              Labels: pull-request-available
>
> {code}
> [ERROR] Tests run: 54, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
> 13.30 s <<< FAILURE! -- in 
> org.apache.hadoop.ozone.container.replication.TestReplicationSupervisor
> [ERROR] 
> org.apache.hadoop.ozone.container.replication.TestReplicationSupervisor.testReconciliationTaskMetrics(ContainerLayoutVersion)[2]
>  -- Time elapsed: 0.042 s <<< FAILURE!
> org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
>       at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183)
>       at 
> org.apache.hadoop.ozone.container.replication.TestReplicationSupervisor.testReconciliationTaskMetrics(TestReplicationSupervisor.java:554)
> {code}
> h3. Root cause
> {{ReplicationSupervisor.TaskRunner}} records task latency with 
> {{Time.monotonicNow()}}, which has millisecond resolution. In 
> {{testReconciliationTaskMetrics}} the reconciliation tasks call a Mockito 
> {{ContainerController}} whose {{reconcileContainer}} does nothing, so all 
> four tasks can finish within the same millisecond. The total latency is then 
> 0 and {{assertTrue(getReplicationRequestTotalTime(...) > 0)}} fails.
> h3. Fix
> Stub {{reconcileContainer}} in the test to sleep 1 ms, so each successful 
> task takes at least 1 ms and the total latency is always positive.
> - https://github.com/apache/ozone/actions/runs/38623161825/job/116062035626



--
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