cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Lebresne <sylv...@yakaz.com>
Subject Re: Inconsistency when unit testing
Date Wed, 07 Apr 2010 15:29:49 GMT
Use ConsistencyLevel.QUORUM when you write *and* when you read.

On Wed, Apr 7, 2010 at 5:26 PM, Philip Jackson <phil@shellarchive.co.uk> wrote:
> Hi,
>
> To summarise my app;
>
>  * try to get item from UserUrl cf
>   * if not found then check in the Url cf to see if we have fetched
>     url before and add to UserUrl.
>   * else, fetch the url and its details put in Url and UserUrl
>
> The unit tests covering this shouldn't hit the else as they put what
> they need in Url (as part of their setup) first. Trouble is, seemingly
> randomly, they do hit the else meaning a read on Url "gets there
> before" the write (it's all sequential in my code).
>
> Is there anything I can tweak to stop this happening (considering my
> test conf. will be different to production).
>
> Cheers,
> Phil
>

Mime
View raw message