HDFS-4584. Skip TestNNWithQJM.testNewNamenodeTakesOverWriter() on Windows. Contributed by Arpit Agarwal

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1459592 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tsz-wo Sze 2013-03-21 23:56:06 +00:00
parent c2e186bae6
commit 7ed618e324
2 changed files with 15 additions and 7 deletions

View File

@ -445,6 +445,9 @@ Release 2.0.5-beta - UNRELEASED
HDFS-4615. Fix TestDFSShell failures on Windows. (Arpit Agarwal HDFS-4615. Fix TestDFSShell failures on Windows. (Arpit Agarwal
via szetszwo) via szetszwo)
HDFS-4584. Skip TestNNWithQJM.testNewNamenodeTakesOverWriter() on Windows.
(Arpit Agarwal via szetszwo)
Release 2.0.4-alpha - UNRELEASED Release 2.0.4-alpha - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -18,6 +18,7 @@
package org.apache.hadoop.hdfs.qjournal; package org.apache.hadoop.hdfs.qjournal;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import static org.junit.Assume.*;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@ -43,7 +44,7 @@
public class TestNNWithQJM { public class TestNNWithQJM {
Configuration conf = new HdfsConfiguration(); Configuration conf = new HdfsConfiguration();
private MiniJournalCluster mjc; private MiniJournalCluster mjc = null;
private Path TEST_PATH = new Path("/test-dir"); private Path TEST_PATH = new Path("/test-dir");
private Path TEST_PATH_2 = new Path("/test-dir"); private Path TEST_PATH_2 = new Path("/test-dir");
@ -61,10 +62,11 @@ public void startJNs() throws Exception {
public void stopJNs() throws Exception { public void stopJNs() throws Exception {
if (mjc != null) { if (mjc != null) {
mjc.shutdown(); mjc.shutdown();
mjc = null;
} }
} }
@Test @Test (timeout = 30000)
public void testLogAndRestart() throws IOException { public void testLogAndRestart() throws IOException {
conf.set(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_KEY, conf.set(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_KEY,
MiniDFSCluster.getBaseDirectory() + "/TestNNWithQJM/image"); MiniDFSCluster.getBaseDirectory() + "/TestNNWithQJM/image");
@ -93,9 +95,12 @@ public void testLogAndRestart() throws IOException {
cluster.shutdown(); cluster.shutdown();
} }
} }
@Test @Test (timeout = 30000)
public void testNewNamenodeTakesOverWriter() throws Exception { public void testNewNamenodeTakesOverWriter() throws Exception {
// Skip the test on Windows. See HDFS-4584.
assumeTrue(!Path.WINDOWS);
File nn1Dir = new File( File nn1Dir = new File(
MiniDFSCluster.getBaseDirectory() + "/TestNNWithQJM/image-nn1"); MiniDFSCluster.getBaseDirectory() + "/TestNNWithQJM/image-nn1");
File nn2Dir = new File( File nn2Dir = new File(
@ -154,7 +159,7 @@ public void testNewNamenodeTakesOverWriter() throws Exception {
} }
} }
@Test @Test (timeout = 30000)
public void testMismatchedNNIsRejected() throws Exception { public void testMismatchedNNIsRejected() throws Exception {
conf.set(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_KEY, conf.set(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_KEY,
MiniDFSCluster.getBaseDirectory() + "/TestNNWithQJM/image"); MiniDFSCluster.getBaseDirectory() + "/TestNNWithQJM/image");
@ -188,8 +193,8 @@ public void testMismatchedNNIsRejected() throws Exception {
"Unable to start log segment 1: too few journals", ioe); "Unable to start log segment 1: too few journals", ioe);
} }
} }
@Test @Test (timeout = 30000)
public void testWebPageHasQjmInfo() throws Exception { public void testWebPageHasQjmInfo() throws Exception {
conf.set(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_KEY, conf.set(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_KEY,
MiniDFSCluster.getBaseDirectory() + "/TestNNWithQJM/image"); MiniDFSCluster.getBaseDirectory() + "/TestNNWithQJM/image");