File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
migration-tests/src/test/scala/akka/persistence/r2dbc/migration Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ package akka.persistence.r2dbc.migration
6
6
7
7
import scala .concurrent .ExecutionContext
8
8
import scala .concurrent .Future
9
-
10
9
import akka .Done
11
10
import akka .actor .typed .ActorSystem
12
11
import akka .persistence .Persistence
@@ -15,6 +14,8 @@ import akka.persistence.query.UpdatedDurableState
15
14
import akka .persistence .r2dbc .session .scaladsl .R2dbcSession
16
15
import akka .persistence .r2dbc .state .scaladsl .ChangeHandler
17
16
17
+ import scala .annotation .nowarn
18
+
18
19
class MigrationChangeHandler (system : ActorSystem [_]) extends ChangeHandler [Any ] {
19
20
20
21
private val incrementSql =
@@ -25,6 +26,7 @@ class MigrationChangeHandler(system: ActorSystem[_]) extends ChangeHandler[Any]
25
26
26
27
println(incrementSql)
27
28
29
+ @ nowarn(" msg=exhaustive" )
28
30
override def process (session : R2dbcSession , change : DurableStateChange [Any ]): Future [Done ] = {
29
31
println(" process changer" )
30
32
change match {
Original file line number Diff line number Diff line change @@ -496,7 +496,9 @@ class MigrationToolSpec
496
496
" migrate durable state of one persistenceId with change handler" in {
497
497
if (hasChangeHandler) {
498
498
import akka .persistence .r2dbc .internal .Sql .InterpolationWithAdapter
499
- import r2dbcSettings .codecSettings .DurableStateImplicits ._
499
+ // Scala 3 needs the extra step here
500
+ val durableStateImplicits = r2dbcSettings.codecSettings.DurableStateImplicits
501
+ import durableStateImplicits ._
500
502
val pid = PersistenceId .ofUniqueId(nextPid())
501
503
val slice = persistenceExt.sliceForPersistenceId(pid.id)
502
504
@@ -524,7 +526,9 @@ class MigrationToolSpec
524
526
" migrate durable state of one persistenceId with additional column" in {
525
527
if (hasAdditionalColumn) {
526
528
import akka .persistence .r2dbc .internal .Sql .InterpolationWithAdapter
527
- import r2dbcSettings .codecSettings .DurableStateImplicits ._
529
+ // Scala 3 needs the extra step here
530
+ val durableStateImplicits = r2dbcSettings.codecSettings.DurableStateImplicits
531
+ import durableStateImplicits ._
528
532
val pid = PersistenceId .ofUniqueId(nextPid())
529
533
persistDurableState(pid, " s-column" )
530
534
migration.migrateDurableState(pid.id).futureValue shouldBe 1L
You can’t perform that action at this time.
0 commit comments