Skip to content

Commit

Permalink
[FLINK-13173][tests] only run openSSL-based tests with flink.tests.wi…
Browse files Browse the repository at this point in the history
…th-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.
  • Loading branch information
NicoK committed Jul 10, 2019
1 parent 7ea00ad commit 6d79968
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
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;
Expand All @@ -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");
}
}
Expand Down
2 changes: 1 addition & 1 deletion tools/travis_watchdog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ MVN_TEST_MODULES=$(get_test_modules_for_stage ${TEST})
MVN_LOGGING_OPTIONS="-Dlog.dir=${ARTIFACTS_DIR} -Dlog4j.configuration=file:https://$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"
Expand Down

0 comments on commit 6d79968

Please sign in to comment.