Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase timeout in travis-ci for my selenium tests written on java?

I have a tests wrintten on java (which passes on local machine, test runs about 30 min) and I need to increase timeout in travis-ci, can I change timeout by changing .tavis.yml? 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'm asking because I have an error on travis:

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

So, do I have any option to change time out? May be I need to write down something to .tavis.yml? Thank you.

like image 302
JavaDeveloper88 Avatar asked Apr 24 '15 00:04

JavaDeveloper88


1 Answers

You can increase the timeout by modifying your script command. For instance, to increase the timeout to half an hour:

  - travis_wait 30 mvn package -Dtestng=test.xml

See Mor's answer for a great alternative that doesn't "hang" the build output for 30 minutes.

like image 130
Alice Purcell Avatar answered Oct 24 '22 01:10

Alice Purcell