Clean Embedded Cassandra after testing.

123 views
Skip to first unread message

Guillermo Ortiz

unread,
Apr 1, 2018, 3:54:44 PM4/1/18
to cassandra-unit-users
After executing test with Embedded Cassandra I get an error if I want to execute it again:

An exception or error caused a run to abort: target\embeddedCassandra\log4j-embedded-cassandra.properties
java.nio.file.FileAlreadyExistsException: target\embeddedCassandra\log4j-embedded-cassandra.properties
    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:81)
   
Is it not possible to clean all this directory when Cassandra ends? Right now I do:

override def afterAll(): Unit = {
    super.afterAll()
    session.close()
    cluster.close()
    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra()
  }
Reply all
Reply to author
Forward
0 new messages