Close cluster after testing - #380
Conversation
|
"cluster" here is a thread pool used by the cassandra driver. We try to name them all but we must miss one in the tests as "cluster" is the default name of of the threads if you don't explicitly set one. |
|
We should name it here: Ideally we'd close it in only if the cluster has been used: https://github.com/akka/akka-persistence-cassandra/blob/master/core/src/test/scala/akka/persistence/cassandra/CassandraSpec.scala otherwise any test that hits that lazy val will need to do this. However if you've verified this is the one that is leaked happy to merge this for now |
|
Thanks for the detailed explanation. :) I verified again. I can change to: session.getCluster.close()I did notice , so I just close the cluster directly. cluster.close()
I am thinking of this: final override lazy val cluster = Cluster.builder()
.addContactPoint("localhost")
.withClusterName(this.getClass.getSimpleName)
.withPort(port())
.build() |
chbatey
left a comment
There was a problem hiding this comment.
LGTM, let's remove the leak and fix it in CassandraSpec alter
The cluster doesn't close after finishing the testing.

