From 76e664e931bf0784620b69bc588bd51cf2a024e6 Mon Sep 17 00:00:00 2001 From: Manoj Govindassamy Date: Thu, 21 Dec 2017 15:47:15 -0800 Subject: [PATCH] HDFS-12959. Fix TestOpenFilesWithSnapshot redundant configurations. --- .../namenode/snapshot/TestOpenFilesWithSnapshot.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java index be118a362b..17082a142b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java @@ -66,7 +66,8 @@ public class TestOpenFilesWithSnapshot { public void setup() throws IOException { conf.setBoolean( DFSConfigKeys.DFS_NAMENODE_SNAPSHOT_CAPTURE_OPENFILES, true); - cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build(); + cluster = + new MiniDFSCluster.Builder(conf).numDataNodes(REPLICATION).build(); conf.set("dfs.blocksize", "1048576"); fs = cluster.getFileSystem(); } @@ -252,8 +253,6 @@ private int writeToStream(final FSDataOutputStream outputStream, byte[] buf) */ @Test (timeout = 120000) public void testPointInTimeSnapshotCopiesForOpenFiles() throws Exception { - conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_SNAPSHOT_CAPTURE_OPENFILES, - true); // Construct the directory tree final Path level0A = new Path("/level_0_A"); final Path level0B = new Path("/level_0_B"); @@ -738,8 +737,6 @@ public void run() { */ @Test (timeout = 120000) public void testOpenFilesSnapChecksumWithTrunkAndAppend() throws Exception { - conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_SNAPSHOT_CAPTURE_OPENFILES, - true); // Construct the directory tree final Path dir = new Path("/A/B/C"); fs.mkdirs(dir);