When we run SpringBootTest annotated tests with Spring Data Cassandra, Cassndra conneciton is configured automatically. However, some tests do not need such connection and, if you do not have a Cassandra server to connect, your tests will fail. This document explains how you can configure JUnit tests not to connect to Cassandra in a Spring Data Cassandra enabled project.
If you would like to disable autoconfiguration for Cassandra, you should add the following annotation to your test class:
@SpringBootTest
@EnableAutoConfiguration(exclude = [CassandraAutoConfiguration::class] )
class YourTests {