Skip to content

Commit

Permalink
test: extend R2DBC EventSourcedEndToEndSpec (#1292)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvlugter authored Jan 13, 2025
1 parent b366cc6 commit 4a2eabb
Show file tree
Hide file tree
Showing 4 changed files with 319 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package akka.projection.dynamodb

import java.lang
import java.util.UUID
import java.util.concurrent.CompletionException
import java.util.concurrent.ConcurrentHashMap
Expand Down Expand Up @@ -323,7 +322,7 @@ class EventSourcedEndToEndSpec

private var processedEventsPerProjection: Map[ProjectionId, ConcurrentHashMap[String, java.lang.Boolean]] = Map.empty

private def processedEvents(projectionId: ProjectionId): ConcurrentHashMap[String, lang.Boolean] = {
private def processedEvents(projectionId: ProjectionId): ConcurrentHashMap[String, java.lang.Boolean] = {
processedEventsPerProjection.get(projectionId) match {
case None =>
val processedEvents = new ConcurrentHashMap[String, java.lang.Boolean]
Expand Down Expand Up @@ -492,7 +491,7 @@ class EventSourcedEndToEndSpec
Thread.sleep(1500)
}

val projections = startProjectionsFactory()
var projections = startProjectionsFactory()

// give them some time to start before writing more events
Thread.sleep(200)
Expand All @@ -518,7 +517,7 @@ class EventSourcedEndToEndSpec

// resume projections again
if (n == (numberOfEvents / 2) + 20)
startProjectionsFactory()
projections = startProjectionsFactory()

if (n % 10 == 0)
Thread.sleep(50)
Expand Down
Loading

0 comments on commit 4a2eabb

Please sign in to comment.