cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zach Richardson <j.zach.richard...@gmail.com>
Subject Re: Distributed testing
Date Wed, 30 Nov 2011 17:30:23 GMT
One thing that I think would help with this, that I noticed when
wanting to shoot myself in the head when trying to write unit tests to
test anything, is getting rid of the ridiculously large number of
static classes.  I understand this would be a very large effort (and
would make the code more verbose) since the dependencies on accessing
them are littered throughout the entire codebase.  It would make it
much easier to create mock objects for dependency injection so that
you can more thoroughly test individual components without having to
run it in a distributed environment to even know if it is working.

This is just my 2-cents, and if there is an interest in refactoring to
remove some of the static classes (beyond my own interest), I would be
more than happy to help.

Zach

On Wed, Nov 30, 2011 at 11:16 AM, Sylvain Lebresne <sylvain@datastax.com> wrote:
> Cassandra needs distributed regression testing. The current unit tests and
> so-called 'system' tests are great, but limited in scope for a distributed
> system.  As pointed by others very recently, this can only help towards the
> goal of having bullet-proof releases (this is obviously not enough, but it's
> needed all the same).
>
> We have an attempt at distributed tests in-tree but it never caught up.
> Amongst the reason, is probably the fact that they are using whirr and
> thus require an EC2 or Rackspace account.
>
> To try to solve that problem, Datastax has developed a small distributed test
> framework called cassandra-dtest (dtest for short). It is written in python
> and uses nosetests and ccm (https://github.com/pcmanus/ccm). It is
> open-source and available at https://github.com/riptano/cassandra-dtest. The
> number of tests is yet limited but already far exceed those of the in-tree
> distributed tests. It include in particular multi-DC tests and upgrade tests.
>
> This is very much young code and all inputs will be greatly appreciated. The
> clear goal however is that unless someone has anything better to propose, we
> use this as the default distributed test framework for Cassandra. Which means
> getting into the habit of requiring a regression test (unit or distributed)
> with each bug fix.
>
> --
> Sylvain
>

Mime
View raw message