jsevellec / cassandra-unit

Utility tool to load Data into Cassandra to help you writing good isolated JUnit Test into your application
GNU Lesser General Public License v3.0
425 stars 0 forks source link

com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: Virtual keyspace 'system_views' is not user-modifiable #329

Open An-Nadein opened 2 years ago

An-Nadein commented 2 years ago

setup: jdk 17 junit 5 maven 3.6.3 cassandra driver 4.9

I'm getting com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: Virtual keyspace 'system_views' is not user-modifiable when calling

@AfterAll
    public static void tearDown() {
        /**  cleaning consist in dropping all existing keyspace except "system" :*/
        /** At the moment there's no way to stop Cassandra. Cassandra is started in the same JVM as your tests. It will be shutdown when the JVM used by your tests is shutdown */
        EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
    }

I suspect it's due to the system_views being omitted in the EmbeddedCassandraServerHelper. What's the best way to fix it?