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

This commit is contained in:
Jason Lowe 2017-03-10 13:05:55 -06:00
parent 092ec39fb9
commit 9649c27864
2 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ public Resource createResource(long memory, int vCores) {
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 void testCompareToWithUnboundedResource() {
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 void testCompareToWithNoneResource() {
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 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 void testFitsIn() {
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)));