Skip to content

Commit 168d7ce

Browse files
committed
GEOMESA-3435. use Cassandra and ScyllaDB containers
1 parent 04d7c85 commit 168d7ce

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

geomesa-cassandra/geomesa-cassandra-datastore/pom.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@
5252
<!-- test deps -->
5353
<dependency>
5454
<groupId>org.testcontainers</groupId>
55-
<artifactId>testcontainers</artifactId>
56-
<version>1.20.4</version>
55+
<artifactId>cassandra</artifactId>
56+
<version>1.20.6</version>
57+
<scope>test</scope>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.testcontainers</groupId>
61+
<artifactId>scylladb</artifactId>
62+
<version>1.20.6</version>
5763
<scope>test</scope>
5864
</dependency>
5965
<dependency>

geomesa-cassandra/geomesa-cassandra-datastore/src/test/scala/org/locationtech/geomesa/cassandra/data/CassandraDataStoreTest.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ import org.specs2.matcher.MatchResult
2727
import org.specs2.mutable.Specification
2828
import org.specs2.runner.JUnitRunner
2929
import org.specs2.specification.BeforeAfterAll
30+
import org.testcontainers.cassandra.CassandraContainer
3031
import org.testcontainers.containers.GenericContainer
32+
import org.testcontainers.scylladb.ScyllaDBContainer
3133

3234
@RunWith(classOf[JUnitRunner])
3335
class CassandraDataStoreTest extends Specification with BeforeAfterAll {
@@ -38,8 +40,8 @@ class CassandraDataStoreTest extends Specification with BeforeAfterAll {
3840

3941
var params: Map[String, String] = _
4042

41-
private val cassandraContainer = new GenericContainer[Nothing]("cassandra:4.0.8")
42-
private val scyllaContainer = new GenericContainer[Nothing]("scylladb/scylla:6.2")
43+
private val cassandraContainer: GenericContainer[?] = new CassandraContainer("cassandra:4.0.8")
44+
private val scyllaContainer: GenericContainer[?] = new ScyllaDBContainer("scylladb/scylla:6.2")
4345
private var dsList: List[CassandraDataStore] = List()
4446

4547
def beforeAll(): Unit = {
@@ -57,7 +59,7 @@ class CassandraDataStoreTest extends Specification with BeforeAfterAll {
5759
}
5860

5961

60-
def dsFromContainer(container: GenericContainer[Nothing]): CassandraDataStore = {
62+
def dsFromContainer(container: GenericContainer[?]): CassandraDataStore = {
6163
val cqlSession = new Cluster.Builder().addContactPoints(container.getHost).withPort(9042)
6264
.withSocketOptions(new SocketOptions().setReadTimeoutMillis(12000)).build().connect()
6365
val cqlDataLoader = new CQLDataLoader(cqlSession)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
<specs2.version>4.20.5</specs2.version>
123123
<junit.version>4.13.2</junit.version>
124124
<junit.jupiter.version>5.9.3</junit.jupiter.version>
125-
<testcontainers.version>1.20.3</testcontainers.version>
125+
<testcontainers.version>1.20.6</testcontainers.version>
126126
<testcontainers.accumulo.version>1.4.1</testcontainers.accumulo.version>
127127
<!-- needs to track hadoop: https://github.com/apache/hadoop/blob/release-3.3.6-RC1/hadoop-project/pom.xml#L1279C18-L1279C24 -->
128128
<hadoop.minicluster.mockito.version>2.28.2</hadoop.minicluster.mockito.version>

0 commit comments

Comments
 (0)