Open kporowski opened 7 years ago
What should be the proper behavior:
dropKeyspaceWIthNativeDriver()
should use an idempotent statement (DROP KEYSPACE IF EXISTS ...) and mark it as an idempotent one?CassandraUnitDependencyInjectionIntegrationTestExecutionListener.afterTestClass()
should not throw the exception?Same problem here, solved by this one: https://github.com/jsevellec/cassandra-unit/issues/210#issuecomment-270396532
Hi I have the same problem but the kporowski solution not work in my case. Any idea ? thank you
There is a quick and dirty fix until this issue is diagnosed and fixed.
You can implement your custom class, that inherits from org.cassandraunit.spring.CassandraUnitDependencyInjectionIntegrationTestExecutionListener
,
and overrides its methods with implementation that can retry/ignore exceptions during startup/cleanup of server. Then use it in @TestExecutionListeners
instead of org.cassandraunit.spring.CassandraUnitDependencyInjectionIntegrationTestExecutionListener
.
Thank you for your very fast answer. The quick fix worked but i ashamed of this quick fixe. Any other idea ?
It looks like when there is a timeout on 'DROP KEYSPACE mytestkeyspace'
CassandraUnitDependencyInjectionIntegrationTestExecutionListener.afterTestClass()
fails and test is marked as Error, even though it passed correctly. See attached logs: