How to access the console of Embedded Cassandra?

45 Views Asked by At

I'm using Embedded Cassandra for some unit tests. I'm getting some unexpected error logs, so I'd like to inspect the database that's created to make sure it's what I think it should look like. Is there a way to open the Cassandra console while the test is paused at a breakpoint, like I can with H2?

1

There are 1 best solutions below

2
Dmytro Nosan On

you can configure CassandraBuilder with your own WorkingDirectory and also configure WorkingDestroyer.

https://nosan.github.io/embedded-cassandra/4.1.0/#working-directory-destroyer

https://nosan.github.io/embedded-cassandra/4.1.0/#working-directory

Also, you can set a breakpoint before Cassandra.stop() method.

cassandra.start();
try {

// queries



} finally{
//breakpoint here
cassandra.stop();
}