cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Woodhead (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-250) Add mocking library to lib
Date Mon, 22 Jun 2009 13:30:07 GMT


Adrian Woodhead commented on CASSANDRA-250:

In my experience "system tests" are all very well and good but the problem with them is that
they often take a long time to run, can be very brittle and hard to adapt and are pretty much
useless if you are a developer trying to debug an issue where you want your tests to be as
close to the erroneous code as possible. You want to be able to run and debug tests in an
IDE with a minimal amount of setup. In cases like this it makes perfect sense to mock out
parts of the system that you aren't actually interested in. If you have a bug in a commonly-used
utility class why on earth would you rely on a system test to start up an entire production
environment to catch that? 

> Add mocking library to lib
> --------------------------
>                 Key: CASSANDRA-250
>                 URL:
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Johan Oskarsson
>            Priority: Trivial
>             Fix For: 0.4
>         Attachments: mockito-all-1.7.jar
> Cassandra in it's current state can be hard to write unit tests for, the classes are
tightly coupled, a lot of variables and code is static. For example some 10 threads start
up when you call a static method on MessagingService, even though all that method does is
convert a byte array to a short. 
> Should we make use of a mocking library to help us make it easier to write certain tests?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message