diff --git a/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/PushReplicationMigrationIntegrationSpec.scala b/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/PushReplicationMigrationIntegrationSpec.scala index dd285f14f..22115b4ed 100644 --- a/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/PushReplicationMigrationIntegrationSpec.scala +++ b/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/PushReplicationMigrationIntegrationSpec.scala @@ -40,9 +40,10 @@ import org.slf4j.LoggerFactory object PushReplicationMigrationIntegrationSpec { private def config(dc: ReplicaId): Config = { - val journalTable = if (dc.id == "") "event_journal" else s"event_journal_${dc.id}" + val journalTable = if (dc == ReplicaId.empty) "event_journal" else s"event_journal_${dc.id}" val timestampOffsetTable = - if (dc.id == "") "akka_projection_timestamp_offset_store" else s"akka_projection_timestamp_offset_store_${dc.id}" + if (dc == ReplicaId.empty) "akka_projection_timestamp_offset_store" + else s"akka_projection_timestamp_offset_store_${dc.id}" ConfigFactory.parseString(s""" akka.actor.provider = cluster akka.http.server.preview.enable-http2 = on @@ -73,7 +74,7 @@ object PushReplicationMigrationIntegrationSpec { private val DCA = ReplicaId("DCA") private val DCB = ReplicaId("DCB") - private val EdgeReplicaA = ReplicaId("") + private val EdgeReplicaA = ReplicaId.empty } diff --git a/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationIntegrationSpec.scala b/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationIntegrationSpec.scala index 1bc8a6047..e5426e546 100644 --- a/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationIntegrationSpec.scala +++ b/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationIntegrationSpec.scala @@ -96,7 +96,7 @@ object ReplicationIntegrationSpec { object State { val initial = - State("Hello world", LwwTime(Long.MinValue, ReplicaId("")), "", LwwTime(Long.MinValue, ReplicaId(""))) + State("Hello world", LwwTime(Long.MinValue, ReplicaId.empty), "", LwwTime(Long.MinValue, ReplicaId.empty)) } case class State(greeting: String, greetingTimestamp: LwwTime, tag: String, tagTimestamp: LwwTime) diff --git a/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationJavaDSLIntegrationSpec.scala b/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationJavaDSLIntegrationSpec.scala index 63b317697..8e8cf646c 100644 --- a/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationJavaDSLIntegrationSpec.scala +++ b/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationJavaDSLIntegrationSpec.scala @@ -106,7 +106,7 @@ object ReplicationJavaDSLIntegrationSpec { final case class TagChanged(tag: String, timestamp: LwwTime) extends Event object State { - val initial = State("Hello world", LwwTime(Long.MinValue, ReplicaId("")), "") + val initial = State("Hello world", LwwTime(Long.MinValue, ReplicaId.empty), "") } case class State(greeting: String, timestamp: LwwTime, tag: String) diff --git a/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationMigrationIntegrationSpec.scala b/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationMigrationIntegrationSpec.scala index 11cbdd303..d65b1b35b 100644 --- a/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationMigrationIntegrationSpec.scala +++ b/akka-projection-grpc-integration/src/test/scala/akka/projection/grpc/replication/ReplicationMigrationIntegrationSpec.scala @@ -49,9 +49,10 @@ import org.slf4j.LoggerFactory object ReplicationMigrationIntegrationSpec { private def config(dc: ReplicaId): Config = { - val journalTable = if (dc.id == "") "event_journal" else s"event_journal_${dc.id}" + val journalTable = if (dc == ReplicaId.empty) "event_journal" else s"event_journal_${dc.id}" val timestampOffsetTable = - if (dc.id == "") "akka_projection_timestamp_offset_store" else s"akka_projection_timestamp_offset_store_${dc.id}" + if (dc == ReplicaId.empty) "akka_projection_timestamp_offset_store" + else s"akka_projection_timestamp_offset_store_${dc.id}" ConfigFactory.parseString(s""" akka.actor.provider = cluster akka.http.server.preview.enable-http2 = on @@ -80,7 +81,7 @@ object ReplicationMigrationIntegrationSpec { """) } - private val DCA = ReplicaId("") + private val DCA = ReplicaId.empty private val DCB = ReplicaId("DCB") private val DCC = ReplicaId("DCC") diff --git a/akka-projection-grpc-tests/src/test/scala/akka/projection/grpc/internal/EventProducerServiceSpec.scala b/akka-projection-grpc-tests/src/test/scala/akka/projection/grpc/internal/EventProducerServiceSpec.scala index a7df81dc9..2d1756810 100644 --- a/akka-projection-grpc-tests/src/test/scala/akka/projection/grpc/internal/EventProducerServiceSpec.scala +++ b/akka-projection-grpc-tests/src/test/scala/akka/projection/grpc/internal/EventProducerServiceSpec.scala @@ -261,7 +261,7 @@ class EventProducerServiceSpec else Some( ReplicatedEventMetadata( - originReplica = ReplicaId(""), + originReplica = ReplicaId.empty, originSequenceNr = env.sequenceNr, version = VersionVector(env.persistenceId, env.sequenceNr), concurrent = false)))) @@ -609,14 +609,14 @@ class EventProducerServiceSpec val out1 = probe.expectNext() protoAnySerialization.deserialize(out1.getEvent.metadata.get) shouldBe ReplicatedEventMetadata( - originReplica = ReplicaId(""), + originReplica = ReplicaId.empty, originSequenceNr = env1.sequenceNr, version = VersionVector(env1.persistenceId, env1.sequenceNr), concurrent = false) val out2 = probe.expectNext() protoAnySerialization.deserialize(out2.getEvent.metadata.get) shouldBe ReplicatedEventMetadata( - originReplica = ReplicaId(""), + originReplica = ReplicaId.empty, originSequenceNr = env2.sequenceNr, version = VersionVector(env2.persistenceId, env2.sequenceNr), concurrent = false)