This is an automated email from the ASF dual-hosted git repository. nanda pushed a commit to branch ozone-0.4.1 in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/ozone-0.4.1 by this push: new b4480cc HDDS-1955. TestBlockOutputStreamWithFailures#test2DatanodesFailure failing because of assertion error. b4480cc is described below commit b4480cca596911f50cd2d41b733be491c1521f32 Author: Mukul Kumar Singh <msi...@apache.org> AuthorDate: Wed Aug 14 20:36:43 2019 +0530 HDDS-1955. TestBlockOutputStreamWithFailures#test2DatanodesFailure failing because of assertion error. Signed-off-by: Nanda kumar <na...@apache.org> (cherry picked from commit 2432356570140ec7f55e1ab56e442c373ff05a16) --- .../rpc/TestBlockOutputStreamWithFailures.java | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStreamWithFailures.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStreamWithFailures.java index 7a69e27..8649837 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStreamWithFailures.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStreamWithFailures.java @@ -501,14 +501,18 @@ public class TestBlockOutputStreamWithFailures { // and one flush for partial chunk key.flush(); - // Since, 2 datanodes went down, if the pipeline gets destroyed quickly, - // it will hit GroupMismatchException else, it will fail with - // RaftRetryFailureException - Assert.assertTrue((HddsClientUtils. - checkForException(blockOutputStream - .getIoException()) instanceof RaftRetryFailureException) - || HddsClientUtils.checkForException( - blockOutputStream.getIoException()) instanceof GroupMismatchException); + Throwable ioException = HddsClientUtils.checkForException( + blockOutputStream.getIoException()); + // Since, 2 datanodes went down, + // a) if the pipeline gets destroyed quickly it will hit + // GroupMismatchException. + // b) will hit close container exception if the container is closed + // but pipeline is still not destroyed. + // 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 Assert.assertTrue(keyOutputStream.getRetryCount() == 0); // now close the stream, It will update the ack length after watchForCommit --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org