YARN-6321. TestResources test timeouts are too aggressive. Contributed by Eric Badger

(cherry picked from commit 9649c27864)
This commit is contained in:
Jason Lowe 2017-03-10 13:05:55 -06:00
parent 8c44a9db21
commit ef95e74eb1
2 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ public class TestResources {
return Resource.newInstance(memory, vCores);
}
@Test(timeout=1000)
@Test(timeout=10000)
public void testCompareToWithUnboundedResource() {
assertTrue(Resources.unbounded().compareTo(
createResource(Long.MAX_VALUE, Integer.MAX_VALUE)) == 0);
@ -40,7 +40,7 @@ public class TestResources {
createResource(0, Integer.MAX_VALUE)) > 0);
}
@Test(timeout=1000)
@Test(timeout=10000)
public void testCompareToWithNoneResource() {
assertTrue(Resources.none().compareTo(createResource(0, 0)) == 0);
assertTrue(Resources.none().compareTo(
@ -49,7 +49,7 @@ public class TestResources {
createResource(0, 1)) < 0);
}
@Test
@Test(timeout=10000)
public void testMultipleRoundUp() {
final double by = 0.5;
final String memoryErrorMsg = "Invalid memory size.";

View File

@ -22,7 +22,7 @@ import static org.junit.Assert.*;
import org.junit.Test;
public class TestResources {
@Test(timeout=1000)
@Test(timeout=10000)
public void testFitsIn() {
assertTrue(fitsIn(createResource(1, 1), createResource(2, 2)));
assertTrue(fitsIn(createResource(2, 2), createResource(2, 2)));
@ -31,7 +31,7 @@ public class TestResources {
assertFalse(fitsIn(createResource(2, 1), createResource(1, 2)));
}
@Test(timeout=1000)
@Test(timeout=10000)
public void testComponentwiseMin() {
assertEquals(createResource(1, 1),
componentwiseMin(createResource(1, 1), createResource(2, 2)));