svn merge -c 1459592 from trunk for HDFS-4584. Skip TestNNWithQJM.testNewNamenodeTakesOverWriter() on Windows.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1459593 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tsz-wo Sze 2013-03-21 23:57:30 +00:00
parent 21210295d6
commit 6af4449beb
2 changed files with 15 additions and 7 deletions

View File

@ -109,6 +109,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 @@ import org.junit.Test;
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 class TestNNWithQJM {
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");
@ -94,8 +96,11 @@ public class TestNNWithQJM {
} }
} }
@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 class TestNNWithQJM {
} }
} }
@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");
@ -189,7 +194,7 @@ public class TestNNWithQJM {
} }
} }
@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");