HDDS-1955. TestBlockOutputStreamWithFailures#test2DatanodesFailure failing because of assertion error.
Signed-off-by: Nanda kumar <nanda@apache.org>
This commit is contained in:
parent
e5e609384f
commit
2432356570
@ -501,14 +501,18 @@ public void test2DatanodesFailure() throws Exception {
|
|||||||
// and one flush for partial chunk
|
// and one flush for partial chunk
|
||||||
key.flush();
|
key.flush();
|
||||||
|
|
||||||
// Since, 2 datanodes went down, if the pipeline gets destroyed quickly,
|
Throwable ioException = HddsClientUtils.checkForException(
|
||||||
// it will hit GroupMismatchException else, it will fail with
|
blockOutputStream.getIoException());
|
||||||
// RaftRetryFailureException
|
// Since, 2 datanodes went down,
|
||||||
Assert.assertTrue((HddsClientUtils.
|
// a) if the pipeline gets destroyed quickly it will hit
|
||||||
checkForException(blockOutputStream
|
// GroupMismatchException.
|
||||||
.getIoException()) instanceof RaftRetryFailureException)
|
// b) will hit close container exception if the container is closed
|
||||||
|| HddsClientUtils.checkForException(
|
// but pipeline is still not destroyed.
|
||||||
blockOutputStream.getIoException()) instanceof GroupMismatchException);
|
// c) will fail with RaftRetryFailureException if the leader election
|
||||||
|
// did not finish before the request retry count finishes.
|
||||||
|
Assert.assertTrue(ioException instanceof RaftRetryFailureException
|
||||||
|
|| ioException instanceof GroupMismatchException
|
||||||
|
|| ioException instanceof ContainerNotOpenException);
|
||||||
// Make sure the retryCount is reset after the exception is handled
|
// Make sure the retryCount is reset after the exception is handled
|
||||||
Assert.assertTrue(keyOutputStream.getRetryCount() == 0);
|
Assert.assertTrue(keyOutputStream.getRetryCount() == 0);
|
||||||
// now close the stream, It will update the ack length after watchForCommit
|
// now close the stream, It will update the ack length after watchForCommit
|
||||||
|
Loading…
Reference in New Issue
Block a user