hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1201963 - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs: TestDfsOverAvroRpc.java TestLocalDFS.java
Date Mon, 14 Nov 2011 23:34:21 GMT
Author: todd
Date: Mon Nov 14 23:34:21 2011
New Revision: 1201963

URL: http://svn.apache.org/viewvc?rev=1201963&view=rev
Log:
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.

Modified:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDfsOverAvroRpc.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLocalDFS.java

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDfsOverAvroRpc.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDfsOverAvroRpc.java?rev=1201963&r1=1201962&r2=1201963&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDfsOverAvroRpc.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDfsOverAvroRpc.java
Mon Nov 14 23:34:21 2011
@@ -19,11 +19,14 @@ package org.apache.hadoop.hdfs;
 
 import java.io.IOException;
 
+import org.junit.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
  * infer namenode RPC protocols. */
 public class TestDfsOverAvroRpc extends TestLocalDFS {
 
+  @Test(timeout=20000)
   public void testWorkingDirectory() throws IOException {
     System.setProperty("hdfs.rpc.engine",
                        "org.apache.hadoop.ipc.AvroRpcEngine");

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLocalDFS.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLocalDFS.java?rev=1201963&r1=1201962&r2=1201963&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLocalDFS.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLocalDFS.java
Mon Nov 14 23:34:21 2011
@@ -17,7 +17,8 @@
  */
 package org.apache.hadoop.hdfs;
 
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
 import java.io.*;
 import org.apache.hadoop.conf.Configuration;
 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
  * mini-cluster.
  */
-public class TestLocalDFS extends TestCase {
+public class TestLocalDFS {
 
   private void writeFile(FileSystem fileSys, Path name) throws IOException {
     DataOutputStream stm = fileSys.create(name);
@@ -59,6 +60,7 @@ public class TestLocalDFS extends TestCa
   /**
    * Tests get/set working directory in DFS.
    */
+  @Test(timeout=20000)
   public void testWorkingDirectory() throws IOException {
     Configuration conf = new HdfsConfiguration();
     MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();



Mime
View raw message