Travis, Maven & Flaky Tests

76 views
Skip to first unread message

Sam Berlin

unread,
Jul 11, 2014, 9:24:50 AM7/11/14
to google...@googlegroups.com
Hi All,

We've setup Travis for continuous integration for Guice.  There were a few flaky tests (that for some reason weren't flaking for us internally), but I've cut those down to now just a single flake that I need to spend some more time with.

One remaining issue is that Maven on Travis seems to occasionally stall while downloading dependencies, and Travis times out after 10 minutes of "no output".  Here's some examples: link1, link2.  

Is anyone familiar with this?  Any idea if we can do anything to fix it?

I think we're just about set on GitHub now.  I've cleaned up all the various links to codesite so everything points to GitHub now, and redirected the codesite page as much as possible to GitHub.  (I don't want to use the "move project" admin settings, because we still need it alive to link back to binary issue attachments that GitHub can't host.)

Thanks!

sam

Stuart McCulloch

unread,
Jul 11, 2014, 11:35:20 AM7/11/14
to google...@googlegroups.com
On 11 Jul 2014, at 14:24, Sam Berlin <sbe...@gmail.com> wrote:

Hi All,

We've setup Travis for continuous integration for Guice.  There were a few flaky tests (that for some reason weren't flaking for us internally), but I've cut those down to now just a single flake that I need to spend some more time with.

One remaining issue is that Maven on Travis seems to occasionally stall while downloading dependencies, and Travis times out after 10 minutes of "no output".  Here's some examples: link1, link2.  

Is anyone familiar with this?  Any idea if we can do anything to fix it?

It looks odd that it’s querying https://repository.apache.org when Guice should be able to build against just Central (which is backed by a CDN) - does the travis configuration use a different profile or maven settings file?

I think we're just about set on GitHub now.  I've cleaned up all the various links to codesite so everything points to GitHub now, and redirected the codesite page as much as possible to GitHub.  (I don't want to use the "move project" admin settings, because we still need it alive to link back to binary issue attachments that GitHub can't host.)

Thanks!

sam

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAJEBNUeQi9cV7JpN3NrOMmyBTf54%2B4nZwb0xAeA6qo0%3D-dRHvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Sam Berlin

unread,
Jul 11, 2014, 12:54:55 PM7/11/14
to google...@googlegroups.com
We're using:  mvn dependency:go-offline test clean --fail-never -DskipTests=true
... but, I experienced the same thing when testing with just 'mvn install' on Travis.

There's nothing else special that I know of.  Maybe the $HOME on Travis jobs has some special configuration parameters that tell it to not use central?  Googling doesn't turn up anything that seems related, short of an issue to cache maven artifacts to avoid the download time.

When I try to do an mvn install or dependency:go-offline locally, it downloads from repo.maven.apache.org.

sam




Stuart McCulloch

unread,
Jul 11, 2014, 1:26:53 PM7/11/14
to google...@googlegroups.com
Note that https://repository.apache.org is the Apache Foundation staging repository for Apache projects, not Central (http://repo.maven.apache.org) and is on a single box without a CDN.

It’s odd to see it in the logs because Maven is not configured to use that repository by default, which makes me think that the Travis config is using a custom settings.xml with additional repositories - and that custom settings.xml has an non-optimal ordering of the repositories in that it’s querying https://repository.apache.org before querying Central. Is there a way we can find out what settings.xml Travis uses and if there’s a way to choose a different one?

PS. I just tried "mvn dependency:go-offline test clean --fail-never -DskipTests=true" locally with an empty repository and the default settings.xml that ships with Maven and it never queries https://repository.apache.org

Sam Berlin

unread,
Jul 11, 2014, 1:30:47 PM7/11/14
to google...@googlegroups.com
I could write a custom script that runs during install to print out various stuff about the environment.  See https://github.com/google/guice/blob/master/generate-latest-docs.sh for an example script that runs after successful builds.  Where would the settings.xml live?

sam


Stuart McCulloch

unread,
Jul 11, 2014, 1:37:10 PM7/11/14
to google...@googlegroups.com
You can use “mvn -V -X” to enable debug logging which will print the location of the settings.xml at the start

Sam Berlin

unread,
Jul 11, 2014, 1:39:11 PM7/11/14
to google...@googlegroups.com

Awesome, thanks. I'll poke around and see what turns up.

sam

Stuart McCulloch

unread,
Jul 11, 2014, 1:45:42 PM7/11/14
to google...@googlegroups.com
BTW, the debug logging is very verbose so I’d only use it to find the location and then switch it off again to avoid littering the build logs :)

I also did some digging in the Travis docs and it looks like they have a 'standard-with-extra-repos’ profile which is enabled by default and this defines the extra repositories.

You should be able to turn that profile off with:

mvn '-P!standard-with-extra-repos' …etc...

(single-quotes to protect the ! operator on linux)

Sam Berlin

unread,
Jul 11, 2014, 2:02:28 PM7/11/14
to google...@googlegroups.com

Sam Berlin

unread,
Jul 11, 2014, 2:08:35 PM7/11/14
to google...@googlegroups.com
... and looks like adding the '-P!standard-with-extra-repos'  fixes things to download from the correct spot.  Should I open an issue with the Travis folks to tell them their defaults are bad?

sam

Sam Berlin

unread,
Jul 14, 2014, 3:12:40 PM7/14/14
to google...@googlegroups.com
FYI, I filed https://github.com/travis-ci/travis-ci/issues/2528 for Travis about the bad defaults.

sam
Reply all
Reply to author
Forward
0 new messages