HDFS-4061. TestBalancer and TestUnderReplicatedBlocks need timeouts. Contributed by Eli Collins

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1399010 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eli Collins 2012-10-16 21:59:15 +00:00
parent 224de4f92c
commit e074b5816a
3 changed files with 8 additions and 7 deletions

View File

@ -456,6 +456,8 @@ Release 2.0.3-alpha - Unreleased
HDFS-3985. Add timeouts to TestMulitipleNNDataBlockScanner. (todd via eli)
HDFS-4061. TestBalancer and TestUnderReplicatedBlocks need timeouts. (eli)
Release 2.0.2-alpha - 2012-09-07
INCOMPATIBLE CHANGES

View File

@ -372,7 +372,7 @@ public void integrationTest(Configuration conf) throws Exception {
* Test parse method in Balancer#Cli class with threshold value out of
* boundaries.
*/
@Test
@Test(timeout=100000)
public void testBalancerCliParseWithThresholdOutOfBoundaries() {
String parameters[] = new String[] { "-threshold", "0" };
String reason = "IllegalArgumentException is expected when threshold value"
@ -394,7 +394,7 @@ public void testBalancerCliParseWithThresholdOutOfBoundaries() {
/** Test a cluster with even distribution,
* then a new empty node is added to the cluster*/
@Test
@Test(timeout=100000)
public void testBalancer0() throws Exception {
testBalancer0Internal(new HdfsConfiguration());
}
@ -406,7 +406,7 @@ void testBalancer0Internal(Configuration conf) throws Exception {
}
/** Test unevenly distributed cluster */
@Test
@Test(timeout=100000)
public void testBalancer1() throws Exception {
testBalancer1Internal(new HdfsConfiguration());
}
@ -419,7 +419,7 @@ void testBalancer1Internal(Configuration conf) throws Exception {
new String[] {RACK0, RACK1});
}
@Test
@Test(timeout=100000)
public void testBalancer2() throws Exception {
testBalancer2Internal(new HdfsConfiguration());
}
@ -467,8 +467,7 @@ private void testBalancerDefaultConstructor(Configuration conf,
/**
* Test parse method in Balancer#Cli class with wrong number of params
*/
@Test
@Test(timeout=100000)
public void testBalancerCliParseWithWrongParams() {
String parameters[] = new String[] { "-threshold" };
String reason =

View File

@ -30,7 +30,7 @@
import org.junit.Test;
public class TestUnderReplicatedBlocks {
@Test
@Test(timeout=300000) // 5 min timeout
public void testSetrepIncWithUnderReplicatedBlocks() throws Exception {
Configuration conf = new HdfsConfiguration();
final short REPLICATION_FACTOR = 2;