Description
Cassandra is a free and open source, distributed NoSQL database management system. It is designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.Examples
Dependency:
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>cassandra</artifactId>
<version>1.20.0</version>
<scope>test</scope>
</dependency>
Usage:
var cassandra = new CassandraContainer<>(DockerImageName.parse("cassandra:3.11.2"));
cassandra.start();
Dependency:
go get github.com/testcontainers/testcontainers-go/modules/cassandra
Usage:
cassandraContainer, err := cassandra.Run(ctx, "cassandra:4.1.3")
Dependency:
npm install @testcontainers/cassandra --save-dev
Usage:
const container = await new CassandraContainer("cassandra:5.0.2").start();
Dependency:
pip install testcontainers[cassandra]
Usage:
with CassandraContainer("cassandra:4.1.4") as cassandra, Cluster(
cassandra.get_contact_points(),
load_balancing_policy=DCAwareRoundRobinPolicy(cassandra.get_local_datacenter()),
) as cluster:
session = cluster.connect()
result = session.execute("SELECT release_version FROM system.local;")
result.one().release_version