You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by nk...@apache.org on 2019/07/10 13:40:55 UTC

[flink] branch master updated: [FLINK-13173][tests] only run openSSL-based tests with flink.tests.with-openssl

This is an automated email from the ASF dual-hosted git repository.

nkruber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 6d79968  [FLINK-13173][tests] only run openSSL-based tests with flink.tests.with-openssl
6d79968 is described below

commit 6d79968f04d549d37b3bcda086a1484e78f61ac3
Author: Nico Kruber <ni...@ververica.com>
AuthorDate: Tue Jul 9 18:12:08 2019 +0200

    [FLINK-13173][tests] only run openSSL-based tests with flink.tests.with-openssl
    
    Rename `flink.tests.force-openssl` (introduced for Flink 1.9) to
    `flink.tests.with-openssl` and only run openSSL-based unit tests if this is set.
    This way, we avoid systems where the bundled dynamic libraries do not work.
    Travis seems to run fine and will have this property set.
    
    For examples of such scenarios and why (for now) we cannot rely on automatic
    openSSL detection, please refer to
    https://issues.apache.org/jira/browse/FLINK-13172.
---
 .../src/test/java/org/apache/flink/runtime/net/SSLUtilsTest.java | 9 ++++-----
 tools/travis_watchdog.sh                                         | 2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/net/SSLUtilsTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/net/SSLUtilsTest.java
index 1e4b217..791c872 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/net/SSLUtilsTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/net/SSLUtilsTest.java
@@ -43,7 +43,6 @@ import static org.hamcrest.Matchers.arrayContainingInAnyOrder;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
@@ -63,12 +62,12 @@ public class SSLUtilsTest extends TestLogger {
 
 	public static final List<String> AVAILABLE_SSL_PROVIDERS;
 	static {
-		if (OpenSsl.isAvailable()) {
+		if (System.getProperty("flink.tests.with-openssl") != null) {
+			assertTrue(
+				"openSSL not available but required (property 'flink.tests.with-openssl' is set)",
+				OpenSsl.isAvailable());
 			AVAILABLE_SSL_PROVIDERS = Arrays.asList("JDK", "OPENSSL");
 		} else {
-			assertNull(
-				"openSSL not available but required (property 'flink.tests.force-openssl' is set)",
-				System.getProperty("flink.tests.force-openssl"));
 			AVAILABLE_SSL_PROVIDERS = Collections.singletonList("JDK");
 		}
 	}
diff --git a/tools/travis_watchdog.sh b/tools/travis_watchdog.sh
index fe629bb..b6214fa 100755
--- a/tools/travis_watchdog.sh
+++ b/tools/travis_watchdog.sh
@@ -62,7 +62,7 @@ MVN_TEST_MODULES=$(get_test_modules_for_stage ${TEST})
 MVN_LOGGING_OPTIONS="-Dlog.dir=${ARTIFACTS_DIR} -Dlog4j.configuration=file://$LOG4J_PROPERTIES -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
 MVN_COMMON_OPTIONS="-nsu -Dflink.forkCount=2 -Dflink.forkCountTestPackage=2 -Dfast -B -Pskip-webui-build $MVN_LOGGING_OPTIONS"
 MVN_COMPILE_OPTIONS="-DskipTests"
-MVN_TEST_OPTIONS="$MVN_LOGGING_OPTIONS -Dflink.tests.force-openssl"
+MVN_TEST_OPTIONS="$MVN_LOGGING_OPTIONS -Dflink.tests.with-openssl"
 
 MVN_COMPILE="mvn $MVN_COMMON_OPTIONS $MVN_COMPILE_OPTIONS $PROFILE $MVN_COMPILE_MODULES install"
 MVN_TEST="mvn $MVN_COMMON_OPTIONS $MVN_TEST_OPTIONS $PROFILE $MVN_TEST_MODULES verify"