HDFS-2532. Add timeout to TestDfsOverAvroRpc
This test is timing out on trunk, causing tests below it to fail spuriously. This patch doesn't fix the issue -- just adds a JUnit timeout so that the failure is properly attributed to this test. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1201963 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4cdcf7b867
commit
51ce383112
|
@ -19,11 +19,14 @@ package org.apache.hadoop.hdfs;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
/** Test for simple signs of life using Avro RPC. Not an exhaustive test
|
/** Test for simple signs of life using Avro RPC. Not an exhaustive test
|
||||||
* yet, just enough to catch fundamental problems using Avro reflection to
|
* yet, just enough to catch fundamental problems using Avro reflection to
|
||||||
* infer namenode RPC protocols. */
|
* infer namenode RPC protocols. */
|
||||||
public class TestDfsOverAvroRpc extends TestLocalDFS {
|
public class TestDfsOverAvroRpc extends TestLocalDFS {
|
||||||
|
|
||||||
|
@Test(timeout=20000)
|
||||||
public void testWorkingDirectory() throws IOException {
|
public void testWorkingDirectory() throws IOException {
|
||||||
System.setProperty("hdfs.rpc.engine",
|
System.setProperty("hdfs.rpc.engine",
|
||||||
"org.apache.hadoop.ipc.AvroRpcEngine");
|
"org.apache.hadoop.ipc.AvroRpcEngine");
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hdfs;
|
package org.apache.hadoop.hdfs;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import org.junit.Test;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
import org.apache.hadoop.fs.FileSystem;
|
||||||
|
@ -27,7 +28,7 @@ import org.apache.hadoop.fs.Path;
|
||||||
* This class tests the DFS class via the FileSystem interface in a single node
|
* This class tests the DFS class via the FileSystem interface in a single node
|
||||||
* mini-cluster.
|
* mini-cluster.
|
||||||
*/
|
*/
|
||||||
public class TestLocalDFS extends TestCase {
|
public class TestLocalDFS {
|
||||||
|
|
||||||
private void writeFile(FileSystem fileSys, Path name) throws IOException {
|
private void writeFile(FileSystem fileSys, Path name) throws IOException {
|
||||||
DataOutputStream stm = fileSys.create(name);
|
DataOutputStream stm = fileSys.create(name);
|
||||||
|
@ -59,6 +60,7 @@ public class TestLocalDFS extends TestCase {
|
||||||
/**
|
/**
|
||||||
* Tests get/set working directory in DFS.
|
* Tests get/set working directory in DFS.
|
||||||
*/
|
*/
|
||||||
|
@Test(timeout=20000)
|
||||||
public void testWorkingDirectory() throws IOException {
|
public void testWorkingDirectory() throws IOException {
|
||||||
Configuration conf = new HdfsConfiguration();
|
Configuration conf = new HdfsConfiguration();
|
||||||
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
|
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
|
||||||
|
|
Loading…
Reference in New Issue