HDFS-4310. fix test org.apache.hadoop.hdfs.server.datanode.TestStartSecureDataNode Contributed by Ivan A. Veselovsky.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1421560 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0e7e20de64
commit
23586e1ae5
|
@ -277,6 +277,8 @@ Trunk (Unreleased)
|
||||||
HADOOP-8957 HDFS tests for AbstractFileSystem#IsValidName should be overridden for
|
HADOOP-8957 HDFS tests for AbstractFileSystem#IsValidName should be overridden for
|
||||||
embedded file systems like ViewFs (Chris Nauroth via Sanjay Radia)
|
embedded file systems like ViewFs (Chris Nauroth via Sanjay Radia)
|
||||||
|
|
||||||
|
HDFS-4310. fix test org.apache.hadoop.hdfs.server.datanode.
|
||||||
|
TestStartSecureDataNode (Ivan A. Veselovsky via atm)
|
||||||
|
|
||||||
Release 2.0.3-alpha - Unreleased
|
Release 2.0.3-alpha - Unreleased
|
||||||
|
|
||||||
|
|
|
@ -17,24 +17,14 @@
|
||||||
|
|
||||||
package org.apache.hadoop.hdfs.server.datanode;
|
package org.apache.hadoop.hdfs.server.datanode;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
import static org.junit.Assert.fail;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.security.PrivilegedExceptionAction;
|
|
||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeys;
|
import org.apache.hadoop.fs.CommonConfigurationKeys;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
|
||||||
import org.apache.hadoop.fs.Path;
|
|
||||||
import org.apache.hadoop.fs.permission.FsPermission;
|
|
||||||
import org.apache.hadoop.hdfs.DFSConfigKeys;
|
import org.apache.hadoop.hdfs.DFSConfigKeys;
|
||||||
import org.apache.hadoop.hdfs.HdfsConfiguration;
|
import org.apache.hadoop.hdfs.HdfsConfiguration;
|
||||||
import org.apache.hadoop.hdfs.MiniDFSCluster;
|
import org.apache.hadoop.hdfs.MiniDFSCluster;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
|
||||||
import org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod;
|
|
||||||
import static org.apache.hadoop.security.SecurityUtilTestHelper.isExternalKdcRunning;
|
import static org.apache.hadoop.security.SecurityUtilTestHelper.isExternalKdcRunning;
|
||||||
import org.junit.Assume;
|
import org.junit.Assume;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
@ -67,7 +57,7 @@ public class TestStartSecureDataNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSecureNameNode() throws IOException, InterruptedException {
|
public void testSecureNameNode() throws Exception {
|
||||||
MiniDFSCluster cluster = null;
|
MiniDFSCluster cluster = null;
|
||||||
try {
|
try {
|
||||||
String nnPrincipal =
|
String nnPrincipal =
|
||||||
|
@ -105,9 +95,9 @@ public class TestStartSecureDataNode {
|
||||||
.build();
|
.build();
|
||||||
cluster.waitActive();
|
cluster.waitActive();
|
||||||
assertTrue(cluster.isDataNodeUp());
|
assertTrue(cluster.isDataNodeUp());
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
throw ex;
|
||||||
} finally {
|
} finally {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
|
Loading…
Reference in New Issue