Skip to content

Commit

Permalink
[tests] Add CI property for CI tests on Travis and increase connectio…
Browse files Browse the repository at this point in the history
…n timeout
  • Loading branch information
uce committed Sep 21, 2015
1 parent d91784d commit 2d4fbc0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,16 @@ public static Configuration setZooKeeperRecoveryMode(
config.setString(ConfigConstants.ZOOKEEPER_QUORUM_KEY, zooKeeperQuorum);

// Lower ZooKeeper client timeouts to decrease test time.
config.setInteger(ConfigConstants.ZOOKEEPER_CONNECTION_TIMEOUT, 5000);
config.setInteger(ConfigConstants.ZOOKEEPER_SESSION_TIMEOUT, 5000);
String testEnvironment = System.getProperty("env.ci");

int connTimeout = 5000;
if (testEnvironment != null && testEnvironment.equals("travis")) {
// The regular timeout is to aggressive for Travis and connections are often lost.
connTimeout = 20000;
}

config.setInteger(ConfigConstants.ZOOKEEPER_CONNECTION_TIMEOUT, connTimeout);
config.setInteger(ConfigConstants.ZOOKEEPER_SESSION_TIMEOUT, connTimeout);

// File system state backend
config.setString(ConfigConstants.STATE_BACKEND, "FILESYSTEM");
Expand Down
2 changes: 1 addition & 1 deletion tools/travis_mvn_watchdog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ LOG4J_PROPERTIES=${HERE}/log4j-travis.properties

# Maven command to run. We set the forkCount manually, because otherwise Maven sees too many cores
# on the Travis VMs.
MVN="mvn -Dflink.forkCount=2 -B $PROFILE -Dlog.dir=${ARTIFACTS_DIR} -Dlog4j.configuration=file://$LOG4J_PROPERTIES clean install"
MVN="mvn -Denv.ci=travis -Dflink.forkCount=2 -B $PROFILE -Dlog.dir=${ARTIFACTS_DIR} -Dlog4j.configuration=file://$LOG4J_PROPERTIES clean install"

MVN_PID="${ARTIFACTS_DIR}/watchdog.mvn.pid"
MVN_EXIT="${ARTIFACTS_DIR}/watchdog.mvn.exit"
Expand Down

0 comments on commit 2d4fbc0

Please sign in to comment.