Details
Description
jenkins failure as sleep() time not long enough
Failing for the past 1 build (Since #4 )
Took 7.4 sec.
Error Message
expected:<1> but was:<0>
Stacktrace
java.lang.AssertionError: expected:<1> but was:<0>
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.failNotEquals(Assert.java:835)
at org.junit.Assert.assertEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:633)
assert is after a 3s sleep waiting for reports coming in.
dataNode.reportBadBlocks(block, dataNode.getFSDataset() .getFsVolumeReferences().get(0)); Thread.sleep(3000); // 3s sleep BlockManagerTestUtil.updateState(cluster.getNamesystem() .getBlockManager()); // Verify the bad block has been reported to namenode Assert.assertEquals(1, cluster.getNamesystem().getCorruptReplicaBlocks()); // here
LambdaTestUtils.eventually() should be used around this assert, maybe with an even shorter initial delay so on faster systems, test is faster.
Attachments
Issue Links
- Discovered while testing
-
HADOOP-18470 Release hadoop 3.3.5
- Resolved
- links to