Skip to content

Cassandra Module

Usage example

This example connects to the Cassandra Cluster, creates a keyspaces and asserts that is has been created.

CqlSession session = CqlSession


All methods returning instances of the Cassandra Driver's Cluster object in CassandraContainer have been deprecated. Providing these methods unnecessarily couples the Container to the Driver and creates potential breaking changes if the driver is updated.

Adding this module to your project dependencies

Add the following dependency to your pom.xml/build.gradle file:

testImplementation "org.testcontainers:cassandra:1.19.8"