flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ches...@apache.org
Subject [08/12] flink git commit: [FLINK-7253] [tests] Remove CommonTestUtils#assumeJava8
Date Mon, 31 Jul 2017 11:59:15 GMT
[FLINK-7253] [tests] Remove CommonTestUtils#assumeJava8

This closes #4400.


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

Branch: refs/heads/master
Commit: a4a4e0b9e5eff3d578fde7e2fca3e84661d84b40
Parents: 82c8e18
Author: zentol <chesnay@apache.org>
Authored: Mon Jul 24 13:24:30 2017 +0200
Committer: zentol <chesnay@apache.org>
Committed: Mon Jul 31 12:12:09 2017 +0200

----------------------------------------------------------------------
 .../cassandra/CassandraConnectorITCase.java     |  3 --
 .../runtime/util/BlockingShutdownTest.java      |  3 --
 .../runtime/util/JvmExitOnFatalErrorTest.java   |  3 --
 .../flink/core/testutils/CommonTestUtils.java   | 30 --------------------
 4 files changed, 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/a4a4e0b9/flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
----------------------------------------------------------------------
diff --git a/flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
b/flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
index fe538a8..bc5d1a8 100644
--- a/flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
+++ b/flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
@@ -131,9 +131,6 @@ public class CassandraConnectorITCase extends WriteAheadSinkTestBase<Tuple3<Stri
 	@BeforeClass
 	public static void startCassandra() throws IOException {
 
-		// check if we should run this test, current Cassandra version requires Java >= 1.8
-		org.apache.flink.core.testutils.CommonTestUtils.assumeJava8();
-
 		// generate temporary files
 		tmpDir = CommonTestUtils.createTempDirectory();
 		ClassLoader classLoader = CassandraConnectorITCase.class.getClassLoader();

http://git-wip-us.apache.org/repos/asf/flink/blob/a4a4e0b9/flink-runtime/src/test/java/org/apache/flink/runtime/util/BlockingShutdownTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/util/BlockingShutdownTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/util/BlockingShutdownTest.java
index f22f42f..1fdb4f2 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/util/BlockingShutdownTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/util/BlockingShutdownTest.java
@@ -46,9 +46,6 @@ public class BlockingShutdownTest {
 		// this test works only on linux
 		assumeTrue(OperatingSystem.isLinux());
 
-		// this test leaves remaining processes if not executed with Java 8
-		CommonTestUtils.assumeJava8();
-
 		final File markerFile = new File(
 				EnvironmentInformation.getTemporaryFileDirectory(), UUID.randomUUID() + ".marker");
 

http://git-wip-us.apache.org/repos/asf/flink/blob/a4a4e0b9/flink-runtime/src/test/java/org/apache/flink/runtime/util/JvmExitOnFatalErrorTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/util/JvmExitOnFatalErrorTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/util/JvmExitOnFatalErrorTest.java
index c78a3d5..8031b22 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/util/JvmExitOnFatalErrorTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/util/JvmExitOnFatalErrorTest.java
@@ -83,9 +83,6 @@ public class JvmExitOnFatalErrorTest {
 		// this test works only on linux
 		assumeTrue(OperatingSystem.isLinux());
 
-		// this test leaves remaining processes if not executed with Java 8
-		CommonTestUtils.assumeJava8();
-
 		// to check what went wrong (when the test hangs) uncomment this line 
 //		ProcessEntryPoint.main(new String[0]);
 

http://git-wip-us.apache.org/repos/asf/flink/blob/a4a4e0b9/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/core/testutils/CommonTestUtils.java
----------------------------------------------------------------------
diff --git a/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/core/testutils/CommonTestUtils.java
b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/core/testutils/CommonTestUtils.java
index f0abf40..ecaed1a 100644
--- a/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/core/testutils/CommonTestUtils.java
+++ b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/core/testutils/CommonTestUtils.java
@@ -18,9 +18,6 @@
 
 package org.apache.flink.core.testutils;
 
-import org.junit.Assume;
-import org.junit.internal.AssumptionViolatedException;
-
 import java.io.BufferedWriter;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -37,8 +34,6 @@ import java.security.ProtectionDomain;
 import java.security.cert.Certificate;
 import java.util.Map;
 
-import static org.junit.Assert.fail;
-
 /**
  * This class contains reusable utility methods for unit tests.
  */
@@ -119,31 +114,6 @@ public class CommonTestUtils {
 	}
 
 	// ------------------------------------------------------------------------
-	//  Preconditions on the test environment
-	// ------------------------------------------------------------------------
-
-	/**
-	 * Checks whether this code runs in a Java 8 (Java 1.8) JVM. If not, this throws a
-	 * {@link AssumptionViolatedException}, which causes JUnit to skip the test that
-	 * called this method.
-	 */
-	public static void assumeJava8() {
-		try {
-			String javaVersionString = System.getProperty("java.runtime.version").substring(0, 3);
-			float javaVersion = Float.parseFloat(javaVersionString);
-			Assume.assumeTrue(javaVersion >= 1.8f);
-		}
-		catch (AssumptionViolatedException e) {
-			System.out.println("Skipping CassandraConnectorITCase, because the JDK is < Java 8+");
-			throw e;
-		}
-		catch (Exception e) {
-			e.printStackTrace();
-			fail("Cannot determine Java version: " + e.getMessage());
-		}
-	}
-
-	// ------------------------------------------------------------------------
 	//  Manipulation of environment
 	// ------------------------------------------------------------------------
 


Mime
View raw message