YARN-6321. TestResources test timeouts are too aggressive. Contributed by Eric Badger
(cherry picked from commit 9649c27864
)
This commit is contained in:
parent
8c44a9db21
commit
ef95e74eb1
|
@ -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.";
|
||||
|
|
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue