From 9649c27864a23ea156bae904368c1d3cf94c6e9d Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Fri, 10 Mar 2017 13:05:55 -0600 Subject: [PATCH] YARN-6321. TestResources test timeouts are too aggressive. Contributed by Eric Badger --- .../org/apache/hadoop/yarn/util/resource/TestResources.java | 6 +++--- .../yarn/server/resourcemanager/resource/TestResources.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/resource/TestResources.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/resource/TestResources.java index f8570a8a2f..d79179ac0d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/resource/TestResources.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/resource/TestResources.java @@ -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."; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/resource/TestResources.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/resource/TestResources.java index ae98660688..2a10747ac9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/resource/TestResources.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/resource/TestResources.java @@ -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)));