You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sh...@apache.org on 2019/08/27 06:28:31 UTC

[hadoop] branch trunk updated: HDDS-1998. TestSecureContainerServer#testClientServerRatisGrpc is failing (#1328)

This is an automated email from the ASF dual-hosted git repository.

shashikant pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 3329257  HDDS-1998. TestSecureContainerServer#testClientServerRatisGrpc is failing (#1328)
3329257 is described below

commit 3329257d99d2808e66ae6c2fe87a9c4f8877026f
Author: HUAN-PING SU <pi...@gmail.com>
AuthorDate: Tue Aug 27 14:28:23 2019 +0800

    HDDS-1998. TestSecureContainerServer#testClientServerRatisGrpc is failing (#1328)
---
 .../ozone/container/server/TestSecureContainerServer.java     | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/server/TestSecureContainerServer.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/server/TestSecureContainerServer.java
index 4de814c..431994e 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/server/TestSecureContainerServer.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/server/TestSecureContainerServer.java
@@ -19,6 +19,7 @@
 package org.apache.hadoop.ozone.container.server;
 
 import org.apache.commons.lang3.RandomUtils;
+import org.apache.commons.lang3.exception.ExceptionUtils;
 import org.apache.hadoop.hdds.HddsConfigKeys;
 import org.apache.hadoop.hdds.conf.OzoneConfiguration;
 import org.apache.hadoop.hdds.protocol.DatanodeDetails;
@@ -72,7 +73,6 @@ import java.util.List;
 import java.util.Set;
 
 import static org.apache.hadoop.hdds.HddsConfigKeys.HDDS_BLOCK_TOKEN_ENABLED;
-import static org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.Result.BLOCK_TOKEN_VERIFICATION_FAILED;
 import static org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.Result.SUCCESS;
 import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_SECURITY_ENABLED_KEY;
 import static org.apache.hadoop.ozone.container.ContainerTestHelper.getCreateContainerRequest;
@@ -80,6 +80,7 @@ import static org.apache.hadoop.ozone.container.ContainerTestHelper.getTestConta
 import static org.apache.ratis.rpc.SupportedRpcType.GRPC;
 import static org.apache.ratis.rpc.SupportedRpcType.NETTY;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 /**
  * Test Container servers when security is enabled.
@@ -202,9 +203,11 @@ public class TestSecureContainerServer {
                 " authenticate with GRPC XceiverServer with Ozone block token",
             () -> finalClient.sendCommand(request));
       } else {
-        ContainerCommandResponseProto response = finalClient.
-            sendCommand(request);
-        assertEquals(BLOCK_TOKEN_VERIFICATION_FAILED, response.getResult());
+        IOException e = LambdaTestUtils.intercept(IOException.class,
+            () -> finalClient.sendCommand(request));
+        Throwable rootCause = ExceptionUtils.getRootCause(e);
+        String msg = rootCause.getMessage();
+        assertTrue(msg, msg.contains("Block token verification failed"));
       }
 
       // Test 2: Test success in request with valid block token.


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org