Re: Speeding up schema generation during tests

2016-10-23 Thread horschi
You have to manually do "nodetool flush && nodetool flush system" before shutdown, otherwise Cassandra might break. With that it is working nicely. On Sun, Oct 23, 2016 at 3:40 PM, Ali Akhtar wrote: > I'm using https://github.com/jsevellec/cassandra-unit and haven't come >

Re: Speeding up schema generation during tests

2016-10-23 Thread Ali Akhtar
I'm using https://github.com/jsevellec/cassandra-unit and haven't come across any race issues or problems. Cassandra-unit takes care of creating the schema before it runs the tests. On Sun, Oct 23, 2016 at 6:17 PM, DuyHai Doan wrote: > Ok I have added

Re: Speeding up schema generation during tests

2016-10-23 Thread DuyHai Doan
Ok I have added -Dcassandra.unsafesystem=true and my tests are broken. The reason is that I create some schemas before executing tests. When unable unsafesystem, Cassandra does not block for schema flush so you man run into race conditions where the test start using the created schema but it has

Re: Speeding up schema generation during tests

2016-10-19 Thread DuyHai Doan
Ohh didn't know such system property exist, nice idea! On Wed, Oct 19, 2016 at 9:40 AM, horschi wrote: > Have you tried starting Cassandra with -Dcassandra.unsafesystem=true ? > > > On Wed, Oct 19, 2016 at 9:31 AM, DuyHai Doan wrote: > >> As I said,

Re: Speeding up schema generation during tests

2016-10-19 Thread Ali Akhtar
Horschi, you are the hero gotham deserves. Test time reduced from 10 seconds to 800 ms On Wed, Oct 19, 2016 at 12:40 PM, horschi wrote: > Have you tried starting Cassandra with -Dcassandra.unsafesystem=true ? > > > On Wed, Oct 19, 2016 at 9:31 AM, DuyHai Doan

Re: Speeding up schema generation during tests

2016-10-19 Thread horschi
Have you tried starting Cassandra with -Dcassandra.unsafesystem=true ? On Wed, Oct 19, 2016 at 9:31 AM, DuyHai Doan wrote: > As I said, when I bootstrap the server and create some keyspace, sometimes > the schema is not fully initialized and when the test code tried to

Re: Speeding up schema generation during tests

2016-10-19 Thread DuyHai Doan
As I said, when I bootstrap the server and create some keyspace, sometimes the schema is not fully initialized and when the test code tried to insert data, it fails. I did not have time to dig into the source code to find the root cause, maybe it's something really stupid and simple to fix. If

Re: Speeding up schema generation during tests

2016-10-19 Thread Ali Akhtar
Thanks. I've disabled durable writes but this is still pretty slow (about 10 seconds). What issues did you run into with your impl? On Wed, Oct 19, 2016 at 12:15 PM, DuyHai Doan wrote: > There is a lot of pre-flight checks when starting the cassandra server and > they

Re: Speeding up schema generation during tests

2016-10-19 Thread DuyHai Doan
There is a lot of pre-flight checks when starting the cassandra server and they took time. For integration testing, I have developped a modified CassandraDeamon here that remove pretty most of those checks: