[QA] Hooking Travis and Gerrit (was: Setting up Travis testing)

Gabriel Wicke gwicke at wikimedia.org
Fri Oct 31 21:35:18 UTC 2014


Antoine,

thanks again for looking into this.

On 10/31/2014 03:05 AM, Antoine Musso wrote:
> As I understand it RESTBase has integration tests hitting a backend
> (Cassandra).  There is a few approaches we can take:
> 
> - flags such tests with a tag which would let us skip them entirely on
> the Wikimedia Jenkins slaves.  That could be known as fast tests and it
> is a good first step.

This would make them post-merge sadly, which I'd like to avoid. It would
make the tests much less useful for code review.

> - whenever it make sense, convert the integration tests to unit tests
> that mock Cassandra

We can do this for restbase (with a sqlite backend, for example), but it
won't work so well for restbase-cassandra, which is the backend module
that's specific to Cassandra. The main thing we are interested in is whether
restbase-cassandra in combination with Cassandra actually implements the
expected storage service behavior. The actual queries emitted don't really
matter, the overall system behavior is what counts.

> - create a dedicated labs instance that is configured like the other
> ones but with Cassandra.  Would need a bunch of integration to setup and
> teardown Cassandra though and figure out a solution for multiple tests
> to use different instances / data set.
>
> Overall, that is slightly more difficult than using Travis, but doable.
We'd get really close to building our own Travis clone. It's doable, but I'm
not convinced that it's worth the investment over installing an existing
solution.

My experience with Travis so far has been pretty positive. Setting up tests
is fairly straightforward. For example, this is what I did to test
restbase-cassandra against Cassandra & different node versions:

1) add a config like
https://github.com/gwicke/restbase-cassandra/blob/master/.travis.yml (could
also apt-get install things here)
2) enable Travis testing for the repository by checking a box in the Travis
web UI

Gabriel



More information about the QA mailing list