This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-pekko-persistence-dynamodb.git
The following commit(s) were added to refs/heads/main by this push:
new 58969c8 test with newer akka (#19)
58969c8 is described below
commit 58969c8e8ab46697d5ae0b1787005dd31bcf4d9a
Author: PJ Fanning <[email protected]>
AuthorDate: Mon Feb 20 18:26:08 2023 +0100
test with newer akka (#19)
* test with newer akka
* need to enable java serialization for some tests
* fix issue with stackoverflow
* scalafmt
* centralise config
---
build.sbt | 4 ++--
.../internal/DynamoDBCurrentPersistenceIdsQuery.scala | 2 +-
src/test/resources/application.conf | 19 +++++++++++++------
.../journal/BackwardsCompatibilityV1Spec.scala | 4 ++--
.../dynamodb/journal/PersistAllConsistencySpec.scala | 4 ++--
5 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/build.sbt b/build.sbt
index a461d85..51ba27d 100644
--- a/build.sbt
+++ b/build.sbt
@@ -4,7 +4,7 @@ scalaVersion := "2.13.7"
crossScalaVersions := Seq("2.12.13", "2.12.15", "2.13.5", "2.13.7")
crossVersion := CrossVersion.binary
-val akkaVersion = "2.5.29"
+val akkaVersion = "2.6.20"
val amzVersion = "1.12.286"
val testcontainersScalaVersion = "0.40.10"
@@ -19,7 +19,7 @@ libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-persistence-tck" % akkaVersion % "test",
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % "test",
- "org.scalatest" %% "scalatest" % "3.0.8" % "test",
+ "org.scalatest" %% "scalatest" % "3.1.4" % "test",
"commons-io" % "commons-io" % "2.11.0" % "test",
"org.hdrhistogram" % "HdrHistogram" % "2.1.8" % "test",
"com.dimafeng" %% "testcontainers-scala-scalatest" %
testcontainersScalaVersion % "test")
diff --git
a/src/main/scala/akka/persistence/dynamodb/query/scaladsl/internal/DynamoDBCurrentPersistenceIdsQuery.scala
b/src/main/scala/akka/persistence/dynamodb/query/scaladsl/internal/DynamoDBCurrentPersistenceIdsQuery.scala
index 09eb1a6..85c81b6 100644
---
a/src/main/scala/akka/persistence/dynamodb/query/scaladsl/internal/DynamoDBCurrentPersistenceIdsQuery.scala
+++
b/src/main/scala/akka/persistence/dynamodb/query/scaladsl/internal/DynamoDBCurrentPersistenceIdsQuery.scala
@@ -101,7 +101,7 @@ trait DynamoDBCurrentPersistenceIdsQuery extends
PublicDynamoDBCurrentPersistenc
def lazyStream(currentResult: ResultSource): ResultSource = {
def nextResult: ResultSource = currentResult.mapAsync(parallelism =
1)(nextCall)
- currentResult.concatLazy(lazyStream(nextResult))
+ currentResult.concatLazy(Source.lazySource { () =>
lazyStream(nextResult) })
}
val infiniteStreamOfResults: ResultSource =
diff --git a/src/test/resources/application.conf
b/src/test/resources/application.conf
index ffe4b8e..edd4333 100644
--- a/src/test/resources/application.conf
+++ b/src/test/resources/application.conf
@@ -18,12 +18,19 @@ my-dynamodb-snapshot-store {
tracing = off
}
-akka.persistence.journal.plugin = "my-dynamodb-journal"
-akka.persistence.snapshot-store.plugin = "my-dynamodb-snapshot-store"
-akka.persistence.publish-confirmations = on
-akka.persistence.publish-plugin-commands = on
-akka.loggers = ["akka.testkit.TestEventListener"]
-akka.loglevel = INFO
+akka {
+ loggers = ["akka.testkit.TestEventListener"]
+ loglevel = INFO
+ actor {
+ allow-java-serialization = on
+ }
+ persistence {
+ journal.plugin = "my-dynamodb-journal"
+ snapshot-store.plugin = "my-dynamodb-snapshot-store"
+ publish-confirmations = on
+ publish-plugin-commands = on
+ }
+}
dynamodb-read-journal {
persistence-ids-index-name: "my-persistence-ids-idx"
diff --git
a/src/test/scala/akka/persistence/dynamodb/journal/BackwardsCompatibilityV1Spec.scala
b/src/test/scala/akka/persistence/dynamodb/journal/BackwardsCompatibilityV1Spec.scala
index 26ec5dc..50ed4f9 100644
---
a/src/test/scala/akka/persistence/dynamodb/journal/BackwardsCompatibilityV1Spec.scala
+++
b/src/test/scala/akka/persistence/dynamodb/journal/BackwardsCompatibilityV1Spec.scala
@@ -20,7 +20,7 @@ import org.scalatest.concurrent.ScalaFutures
import java.util.Base64
class BackwardsCompatibilityV1Spec
- extends TestKit(ActorSystem("PartialAsyncSerializationSpec"))
+ extends TestKit(ActorSystem("BackwardsCompatibilityV1Spec"))
with ImplicitSender
with WordSpecLike
with BeforeAndAfterAll
@@ -104,7 +104,7 @@ class BackwardsCompatibilityV1Spec
val messages = 20
val probe = TestProbe()
- s"successfully replay events in old format - created by old version of the
plugin" in {
+ "successfully replay events in old format - created by old version of the
plugin" in {
journal ! ReplayMessages(0, 20, Long.MaxValue, persistenceId, probe.ref)
(1 to messages).foreach(i => {
diff --git
a/src/test/scala/akka/persistence/dynamodb/journal/PersistAllConsistencySpec.scala
b/src/test/scala/akka/persistence/dynamodb/journal/PersistAllConsistencySpec.scala
index 8818466..86fd2fd 100644
---
a/src/test/scala/akka/persistence/dynamodb/journal/PersistAllConsistencySpec.scala
+++
b/src/test/scala/akka/persistence/dynamodb/journal/PersistAllConsistencySpec.scala
@@ -8,7 +8,7 @@ import akka.persistence.JournalProtocol._
import akka.persistence._
import akka.persistence.dynamodb._
import akka.testkit._
-import org.scalactic.ConversionCheckedTripleEquals
+import org.scalactic.TypeCheckedTripleEquals
import org.scalatest._
import org.scalatest.concurrent.ScalaFutures
@@ -19,7 +19,7 @@ class PersistAllConsistencySpec
with BeforeAndAfterAll
with Matchers
with ScalaFutures
- with ConversionCheckedTripleEquals
+ with TypeCheckedTripleEquals
with DynamoDBUtils
with IntegSpec {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]