How can I increase the timeout in travis-ci for my selenium tests written in java?

I have wrintten tests on java (which runs on a local machine, the test takes about 30 minutes) and I need to increase the timeout in travis-ci, is it possible to change the timeout by changing the .tavis.yml value? This is my .tavis.yml file:

language: java

cache: apt

before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -qq default-jdk maven

env:
  - JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64

script:
  - travis_wait mvn package -Dtestng=test.xml

      

I am asking because I have a bug on travis:

Timeout (20 minutes) reached. Terminating "mvn package -Dtestng=test.xml"

      

So, do I have the option to change the timeout? Maybe I need to write something in .tavis.yml? Thank.

+3


source to share


2 answers


You can increase the timeout by changing the script command. For example, to increase the timeout to half an hour:



  - travis_wait 30 mvn package -Dtestng=test.xml

      

+3


source


Your tests don't seem to produce any output, which usually results in a timeout after 10 minutes.

However, since you prefix the build command with travis_wait

, this timeout increases to 20 minutes.



The shell environment in our prefab system provides a feature that helps bypass this for at least 10 minutes longer.

travis_wait writes a short line to the build log every minute for 20 minutes, increasing the amount of time your command should complete.

Double check to see if your tests are hanging.

+1


source







All Articles