flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [2/5] flink git commit: [FLINK-1868] [tests] Fix corner case of EnvironmentInformationTest
Date Mon, 13 Apr 2015 16:23:32 GMT
[FLINK-1868] [tests] Fix corner case of EnvironmentInformationTest


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/0e6c9d4b
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/0e6c9d4b
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/0e6c9d4b

Branch: refs/heads/master
Commit: 0e6c9d4b53b4b87ec6940e62672baf73f97a8283
Parents: ad63707
Author: Stephan Ewen <sewen@apache.org>
Authored: Mon Apr 13 12:52:58 2015 +0200
Committer: Stephan Ewen <sewen@apache.org>
Committed: Mon Apr 13 16:38:21 2015 +0200

----------------------------------------------------------------------
 .../flink/runtime/util/EnvironmentInformationTest.java    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/0e6c9d4b/flink-runtime/src/test/java/org/apache/flink/runtime/util/EnvironmentInformationTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/util/EnvironmentInformationTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/util/EnvironmentInformationTest.java
index 8da7b14..764cb57 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/util/EnvironmentInformationTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/util/EnvironmentInformationTest.java
@@ -34,10 +34,12 @@ public class EnvironmentInformationTest {
 			long freeWithGC = EnvironmentInformation.getSizeOfFreeHeapMemoryWithDefrag();
 			
 			assertTrue(fullHeap > 0);
-			assertTrue(free > 0);
-			assertTrue(freeWithGC > 0);
-			assertTrue(free <= fullHeap);
-			assertTrue(freeWithGC <= fullHeap);
+			assertTrue(free >= 0);
+			assertTrue(freeWithGC >= 0);
+			
+			// we cannot make these assumptions, because the test JVM may grow / shrink during the
GC
+			// assertTrue(free <= fullHeap);
+			// assertTrue(freeWithGC <= fullHeap);
 		}
 		catch (Exception e) {
 			e.printStackTrace();


Mime
View raw message