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/pekko-persistence-jdbc.git


The following commit(s) were added to refs/heads/main by this push:
     new d0938c2  update function name to match pekko API change (#271)
d0938c2 is described below

commit d0938c27e058eb20f5f1641ec0aef615a043f9d7
Author: PJ Fanning <[email protected]>
AuthorDate: Thu Mar 13 10:04:21 2025 +0100

    update function name to match pekko API change (#271)
---
 .../jdbc/query/javadsl/JdbcReadJournal.scala           |  4 ++--
 .../jdbc/query/scaladsl/JdbcReadJournal.scala          |  2 +-
 ...CurrentLastSequenceNumberByPersistenceIdTest.scala} | 12 ++++++------
 .../pekko/persistence/jdbc/query/QueryTestSpec.scala   |  4 ++--
 ...entLastKnownSequenceNumberByPersistenceIdTest.scala | 18 +++++++++---------
 5 files changed, 20 insertions(+), 20 deletions(-)

diff --git 
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/javadsl/JdbcReadJournal.scala
 
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/javadsl/JdbcReadJournal.scala
index e2009ae..18b2db6 100644
--- 
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/javadsl/JdbcReadJournal.scala
+++ 
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/javadsl/JdbcReadJournal.scala
@@ -145,9 +145,9 @@ class JdbcReadJournal(journal: ScalaJdbcReadJournal)
    * @param persistenceId The `persistenceId` for which the last known 
sequence number should be returned.
    * @return Some sequence number or None if the `persistenceId` is unknown.
    */
-  def currentLastKnownSequenceNumberByPersistenceId(persistenceId: String): 
CompletionStage[Optional[java.lang.Long]] =
+  def currentLastSequenceNumberByPersistenceId(persistenceId: String): 
CompletionStage[Optional[java.lang.Long]] =
     journal
-      .currentLastKnownSequenceNumberByPersistenceId(persistenceId)
+      .currentLastSequenceNumberByPersistenceId(persistenceId)
       .asJava
       .thenApply(_.map(java.lang.Long.valueOf).toJava)
 }
diff --git 
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/scaladsl/JdbcReadJournal.scala
 
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/scaladsl/JdbcReadJournal.scala
index f55067e..bf34df9 100644
--- 
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/scaladsl/JdbcReadJournal.scala
+++ 
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/scaladsl/JdbcReadJournal.scala
@@ -324,6 +324,6 @@ class JdbcReadJournal(config: Config, configPath: 
String)(implicit val system: E
    * @param persistenceId The `persistenceId` for which the last known 
sequence number should be returned.
    * @return Some sequence number or None if the `persistenceId` is unknown.
    */
-  def currentLastKnownSequenceNumberByPersistenceId(persistenceId: String): 
Future[Option[Long]] =
+  def currentLastSequenceNumberByPersistenceId(persistenceId: String): 
Future[Option[Long]] =
     readJournalDao.lastPersistenceIdSequenceNumber(persistenceId)
 }
diff --git 
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/CurrentLastKnownSequenceNumberByPersistenceIdTest.scala
 
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/CurrentLastSequenceNumberByPersistenceIdTest.scala
similarity index 78%
rename from 
core/src/test/scala/org/apache/pekko/persistence/jdbc/query/CurrentLastKnownSequenceNumberByPersistenceIdTest.scala
rename to 
core/src/test/scala/org/apache/pekko/persistence/jdbc/query/CurrentLastSequenceNumberByPersistenceIdTest.scala
index 47b5a5c..4b3c266 100644
--- 
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/CurrentLastKnownSequenceNumberByPersistenceIdTest.scala
+++ 
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/CurrentLastSequenceNumberByPersistenceIdTest.scala
@@ -19,14 +19,14 @@ package org.apache.pekko.persistence.jdbc.query
 
 import org.scalatest.concurrent.ScalaFutures
 
-abstract class CurrentLastKnownSequenceNumberByPersistenceIdTest(config: 
String) extends QueryTestSpec(config)
+abstract class CurrentLastSequenceNumberByPersistenceIdTest(config: String) 
extends QueryTestSpec(config)
     with ScalaFutures {
 
   it should "return None for unknown persistenceId" in withActorSystem { 
implicit system =>
     val journalOps = new ScalaJdbcReadJournalOperations(system)
 
     journalOps
-      .currentLastKnownSequenceNumberByPersistenceId("unknown")
+      .currentLastSequenceNumberByPersistenceId("unknown")
       .futureValue shouldBe None
   }
 
@@ -41,18 +41,18 @@ abstract class 
CurrentLastKnownSequenceNumberByPersistenceIdTest(config: String)
 
       eventually {
         journalOps
-          .currentLastKnownSequenceNumberByPersistenceId("my-1")
+          .currentLastSequenceNumberByPersistenceId("my-1")
           .futureValue shouldBe Some(4)
 
         // Just ensuring that query targets the correct persistenceId.
         journalOps
-          .currentLastKnownSequenceNumberByPersistenceId("my-2")
+          .currentLastSequenceNumberByPersistenceId("my-2")
           .futureValue shouldBe None
       }
     }
   }
 }
 
-class H2ScalaCurrentLastKnownSequenceNumberByPersistenceIdTest
-    extends 
CurrentLastKnownSequenceNumberByPersistenceIdTest("h2-shared-db-application.conf")
+class H2ScalaCurrentLastSequenceNumberByPersistenceIdTest
+    extends 
CurrentLastSequenceNumberByPersistenceIdTest("h2-shared-db-application.conf")
     with H2Cleaner
diff --git 
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/QueryTestSpec.scala
 
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/QueryTestSpec.scala
index 0d3c65b..182cc71 100644
--- 
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/QueryTestSpec.scala
+++ 
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/QueryTestSpec.scala
@@ -110,8 +110,8 @@ class ScalaJdbcReadJournalOperations(readJournal: 
JdbcReadJournal)(implicit syst
     tp.within(within)(f(tp))
   }
 
-  def currentLastKnownSequenceNumberByPersistenceId(persistenceId: String): 
Future[Option[Long]] =
-    readJournal.currentLastKnownSequenceNumberByPersistenceId(persistenceId)
+  def currentLastSequenceNumberByPersistenceId(persistenceId: String): 
Future[Option[Long]] =
+    readJournal.currentLastSequenceNumberByPersistenceId(persistenceId)
 
   override def countJournal: Future[Long] =
     readJournal
diff --git 
a/integration-test/src/test/scala/org/apache/pekko/persistence/jdbc/integration/CurrentLastKnownSequenceNumberByPersistenceIdTest.scala
 
b/integration-test/src/test/scala/org/apache/pekko/persistence/jdbc/integration/CurrentLastKnownSequenceNumberByPersistenceIdTest.scala
index 35eb0ea..c0136c8 100644
--- 
a/integration-test/src/test/scala/org/apache/pekko/persistence/jdbc/integration/CurrentLastKnownSequenceNumberByPersistenceIdTest.scala
+++ 
b/integration-test/src/test/scala/org/apache/pekko/persistence/jdbc/integration/CurrentLastKnownSequenceNumberByPersistenceIdTest.scala
@@ -10,7 +10,7 @@
 package org.apache.pekko.persistence.jdbc.integration
 
 import org.apache.pekko.persistence.jdbc.query.{
-  CurrentLastKnownSequenceNumberByPersistenceIdTest,
+  CurrentLastSequenceNumberByPersistenceIdTest,
   MysqlCleaner,
   OracleCleaner,
   PostgresCleaner,
@@ -19,18 +19,18 @@ import org.apache.pekko.persistence.jdbc.query.{
 
 // Note: these tests use the shared-db configs, the test for all (so not only 
current) events use the regular db config
 
-class PostgresScalaCurrentLastKnownSequenceNumberByPersistenceIdTest
-    extends 
CurrentLastKnownSequenceNumberByPersistenceIdTest("postgres-shared-db-application.conf")
+class PostgresScalaCurrentLastSequenceNumberByPersistenceIdTest
+    extends 
CurrentLastSequenceNumberByPersistenceIdTest("postgres-shared-db-application.conf")
     with PostgresCleaner
 
-class MySQLScalaCurrentLastKnownSequenceNumberByPersistenceIdTest
-    extends 
CurrentLastKnownSequenceNumberByPersistenceIdTest("mysql-shared-db-application.conf")
+class MySQLScalaCurrentLastSequenceNumberByPersistenceIdTest
+    extends 
CurrentLastSequenceNumberByPersistenceIdTest("mysql-shared-db-application.conf")
     with MysqlCleaner
 
-class OracleScalaCurrentLastKnownSequenceNumberByPersistenceIdTest
-    extends 
CurrentLastKnownSequenceNumberByPersistenceIdTest("oracle-shared-db-application.conf")
+class OracleScalaCurrentLastSequenceNumberByPersistenceIdTest
+    extends 
CurrentLastSequenceNumberByPersistenceIdTest("oracle-shared-db-application.conf")
     with OracleCleaner
 
-class SqlServerScalaCurrentLastKnownSequenceNumberByPersistenceIdTest
-    extends 
CurrentLastKnownSequenceNumberByPersistenceIdTest("sqlserver-shared-db-application.conf")
+class SqlServerScalaCurrentLastSequenceNumberByPersistenceIdTest
+    extends 
CurrentLastSequenceNumberByPersistenceIdTest("sqlserver-shared-db-application.conf")
     with SqlServerCleaner


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to