Skip to content

Commit 746e509

Browse files
committed
fixup! [UPGRADE] Docker cassandra image to 5.0.4
1 parent d320dd8 commit 746e509

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/init/ClusterFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ private static void createKeyspace(KeyspaceConfiguration keyspaceConfiguration,
9292
}
9393

9494
private static void ensureContactable(CqlSession session) {
95-
session.execute("SELECT dateof(now()) FROM system.local ;");
95+
session.execute("SELECT toTimestamp(now()) FROM system.local ;");
9696
}
9797
}

backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/DockerCassandra.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private static Optional<String> getFixedBuildId() {
137137

138138
@SuppressWarnings("resource")
139139
public DockerCassandra() {
140-
this("cassandra_4_1_5-" + buildSpecificImageDiscriminator(),
140+
this("cassandra_5_0_4-" + buildSpecificImageDiscriminator(),
141141
getFixedBuildId().isEmpty(),
142142
AdditionalDockerFileStep.IDENTITY);
143143
}

backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/init/ClusterFactoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void createShouldReturnAContactableCluster(DockerCassandra dockerCassandra) {
6666

6767
void assertThatClusterIsContactable(CqlSession session) {
6868
try {
69-
session.execute("SELECT dateof(now()) FROM system.local ;");
69+
session.execute("SELECT toTimestamp(now()) FROM system.local ;");
7070
} catch (Exception e) {
7171
throw new AssertionError("expecting cluster can be connected but actually not", e);
7272
}

server/task/task-distributed/src/test/java/org/apache/james/task/eventsourcing/distributed/DistributedTaskManagerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,14 +667,14 @@ public static TaskDTOModule<CassandraExecutingTask, CassandraExecutingTaskDTO> m
667667
this.pause = pause;
668668

669669
// Some task requires cassandra query execution upon their creation
670-
Mono.from(session.executeReactive("SELECT dateof(now()) FROM system.local ;"))
670+
Mono.from(session.executeReactive("SELECT toTimestamp(now()) FROM system.local ;"))
671671
.block();
672672
}
673673

674674
@Override
675675
public Result run() throws InterruptedException {
676676
// Task often execute Cassandra logic
677-
Mono.from(session.executeReactive("SELECT dateof(now()) FROM system.local ;"))
677+
Mono.from(session.executeReactive("SELECT toTimestamp(now()) FROM system.local ;"))
678678
.block();
679679

680680
if (pause) {
@@ -692,7 +692,7 @@ public TaskType type() {
692692
@Override
693693
public Optional<TaskExecutionDetails.AdditionalInformation> details() {
694694
// Some task requires cassandra query execution upon detail generation
695-
Mono.from(session.executeReactive("SELECT dateof(now()) FROM system.local ;"))
695+
Mono.from(session.executeReactive("SELECT toTimestamp(now()) FROM system.local ;"))
696696
.block();
697697

698698
return Optional.empty();

0 commit comments

Comments
 (0)