sodonnel commented on code in PR #9351:
URL: https://github.com/apache/ozone/pull/9351#discussion_r2580967527
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/dn/volume/TestDatanodeHddsVolumeFailureDetection.java:
##########
@@ -156,7 +156,8 @@ void corruptContainerFile(boolean schemaV3) throws
Exception {
// refer to HddsVolume.check()
DatanodeTestUtils.simulateBadVolume(vol0);
- // close container to trigger checkVolumeAsync
+ // close container to trigger checkVolumeAsync after 2 seconds as
minGap to check
+ Thread.sleep(2000);
Review Comment:
Which line in the test was failing before the 2 second sleep?
Looking at the code, I suspect it was:
```
DatanodeTestUtils.waitForHandleFailedVolume(volSet, 1);
```
Rather than `assertThrows(IOException.class, c1::close);` as I think the
latter line should pass immediately without any delay.
If it is hte waitForHandleFailedVolume part that is failing, why is it not
waiting already?
```
public static void waitForHandleFailedVolume(
MutableVolumeSet volSet, int numOfFailedVolumes) throws Exception {
GenericTestUtils.waitFor(
() -> numOfFailedVolumes == volSet.getFailedVolumesList().size(),
100, 10000);
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]