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-jdbc.git
The following commit(s) were added to refs/heads/main by this push:
new 7865b14 add types for implicits (#78)
7865b14 is described below
commit 7865b14a8331ea1e9bdaee11fe48257b83dc99ca
Author: PJ Fanning <[email protected]>
AuthorDate: Tue Aug 15 10:41:25 2023 +0100
add types for implicits (#78)
---
.../apache/pekko/persistence/jdbc/state/DurableStateQueries.scala | 2 +-
.../apache/pekko/persistence/jdbc/query/HardDeleteQueryTest.scala | 2 +-
.../persistence/jdbc/query/JournalDaoStreamMessagesMemoryTest.scala | 2 +-
.../pekko/persistence/jdbc/query/JournalSequenceActorTest.scala | 2 +-
.../org/apache/pekko/persistence/jdbc/query/QueryTestSpec.scala | 6 +++---
.../pekko/persistence/jdbc/query/dao/TestProbeReadJournalDao.scala | 2 +-
.../org/apache/pekko/persistence/jdbc/state/ScaladslSnippets.scala | 5 ++---
.../jdbc/state/scaladsl/DurableStateSequenceActorTest.scala | 2 +-
.../pekko/persistence/jdbc/state/scaladsl/StateSpecBase.scala | 2 +-
.../jdbc/state/scaladsl/TestProbeDurableStateStoreQuery.scala | 2 +-
10 files changed, 13 insertions(+), 14 deletions(-)
diff --git
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/DurableStateQueries.scala
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/DurableStateQueries.scala
index 71bca28..590d90b 100644
---
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/DurableStateQueries.scala
+++
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/DurableStateQueries.scala
@@ -49,7 +49,7 @@ import
pekko.persistence.jdbc.config.DurableStateTableConfiguration
case _ => ???
}
- implicit val uuidSetter = SetParameter[Array[Byte]] { case (bytes, params) =>
+ implicit val uuidSetter: SetParameter[Array[Byte]] =
SetParameter[Array[Byte]] { case (bytes, params) =>
params.setBytes(bytes)
}
diff --git
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/HardDeleteQueryTest.scala
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/HardDeleteQueryTest.scala
index 46822d2..8793190 100644
---
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/HardDeleteQueryTest.scala
+++
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/HardDeleteQueryTest.scala
@@ -22,7 +22,7 @@ import scala.concurrent.duration._
import org.scalatest.matchers.should.Matchers
abstract class HardDeleteQueryTest(config: String) extends
QueryTestSpec(config) with Matchers {
- implicit val askTimeout = 500.millis
+ implicit val askTimeout: FiniteDuration = 500.millis
it should "not return deleted events when using CurrentEventsByTag" in
withActorSystem { implicit system =>
val journalOps = new ScalaJdbcReadJournalOperations(system)
diff --git
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalDaoStreamMessagesMemoryTest.scala
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalDaoStreamMessagesMemoryTest.scala
index f6b87b8..fb31410 100644
---
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalDaoStreamMessagesMemoryTest.scala
+++
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalDaoStreamMessagesMemoryTest.scala
@@ -53,7 +53,7 @@ abstract class JournalDaoStreamMessagesMemoryTest(configFile:
String)
val journalSequenceActorConfig =
readJournalConfig.journalSequenceRetrievalConfiguration
val journalTableCfg = journalConfig.journalTableConfiguration
- implicit val askTimeout = 50.millis
+ implicit val askTimeout: FiniteDuration = 50.millis
def generateId: Int = 0
diff --git
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalSequenceActorTest.scala
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalSequenceActorTest.scala
index 03667dd..be9a70a 100644
---
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalSequenceActorTest.scala
+++
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalSequenceActorTest.scala
@@ -43,7 +43,7 @@ abstract class JournalSequenceActorTest(configFile: String,
isOracle: Boolean)
import profile.api._
- implicit val askTimeout = 50.millis
+ implicit val askTimeout: FiniteDuration = 50.millis
def generateId: Int = 0
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 c29f2d8..9c4290c 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
@@ -31,9 +31,9 @@ import pekko.stream.testkit.javadsl.{ TestSink => JavaSink }
import pekko.stream.testkit.scaladsl.TestSink
import pekko.stream.{ Materializer, SystemMaterializer }
import com.typesafe.config.ConfigValue
-import scala.concurrent.Future
-import scala.concurrent.duration.{ FiniteDuration, _ }
+import scala.concurrent.{ ExecutionContext, Future }
+import scala.concurrent.duration.{ FiniteDuration, _ }
import pekko.persistence.jdbc.testkit.internal.H2
import pekko.persistence.jdbc.testkit.internal.MySQL
import pekko.persistence.jdbc.testkit.internal.Oracle
@@ -331,7 +331,7 @@ abstract class QueryTestSpec(config: String,
configOverrides: Map[String, Config
def expectAllStarted(refs: Seq[ActorRef])(implicit system: ActorSystem):
Unit = {
// make sure we notice early if the actors failed to start (because of
issues with journal) makes debugging
// failing tests easier as we know it is not the actual interaction from
the test that is the problem
- implicit val ec = system.dispatcher
+ implicit val ec: ExecutionContext = system.dispatcher
Future.sequence(refs.map(_ ? "state")).futureValue
}
diff --git
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/dao/TestProbeReadJournalDao.scala
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/dao/TestProbeReadJournalDao.scala
index 300b0f8..af3c551 100644
---
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/dao/TestProbeReadJournalDao.scala
+++
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/dao/TestProbeReadJournalDao.scala
@@ -37,7 +37,7 @@ object TestProbeReadJournalDao {
*/
class TestProbeReadJournalDao(val probe: TestProbe) extends ReadJournalDao {
// Since the testprobe is instrumented by the test, it should respond very
fast
- implicit val askTimeout = Timeout(100.millis)
+ implicit val askTimeout: Timeout = Timeout(100.millis)
/**
* Returns distinct stream of persistenceIds
diff --git
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/ScaladslSnippets.scala
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/ScaladslSnippets.scala
index 4719de5..6d0c2aa 100644
---
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/ScaladslSnippets.scala
+++
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/ScaladslSnippets.scala
@@ -9,10 +9,9 @@
package org.apache.pekko.persistence.jdbc.state
-import scala.concurrent.Future
+import scala.concurrent.{ ExecutionContext, Future }
import org.apache.pekko
import pekko.actor.ActorSystem
-import pekko.actor.ActorSystem
import pekko.Done
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.matchers.should.Matchers
@@ -61,7 +60,7 @@ object ScaladslSnippets extends ScalaFutures with Matchers {
def upsertAndGetObject(): Unit = {
implicit val system: ActorSystem = ActorSystem()
- implicit val e = system.dispatcher
+ implicit val e: ExecutionContext = system.dispatcher
// #upsert-get-object
import org.apache.pekko
diff --git
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/DurableStateSequenceActorTest.scala
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/DurableStateSequenceActorTest.scala
index e65589c..a5d3468 100644
---
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/DurableStateSequenceActorTest.scala
+++
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/DurableStateSequenceActorTest.scala
@@ -36,7 +36,7 @@ abstract class DurableStateSequenceActorTest(config: Config,
schemaType: SchemaT
val durableStateSequenceActorConfig = durableStateConfig.stateSequenceConfig
- implicit val askTimeout = 50.millis
+ implicit val askTimeout: FiniteDuration = 50.millis
implicit val timeout: Timeout = Timeout(1.minute)
"A DurableStateSequenceActor" must {
diff --git
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/StateSpecBase.scala
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/StateSpecBase.scala
index a983f64..b4e64a7 100644
---
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/StateSpecBase.scala
+++
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/StateSpecBase.scala
@@ -92,7 +92,7 @@ abstract class StateSpecBase(val config: Config, schemaType:
SchemaType)
lazy val durableStateConfig = new DurableStateTableConfiguration(cfg)
lazy val serialization = SerializationExtension(system)
- implicit val defaultPatience =
+ implicit val defaultPatience: PatienceConfig =
PatienceConfig(timeout = Span(60, Seconds), interval = Span(100, Millis))
def withActorSystem(f: ExtendedActorSystem => Unit): Unit = {
diff --git
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/TestProbeDurableStateStoreQuery.scala
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/TestProbeDurableStateStoreQuery.scala
index 8c5dcfc..782a28c 100644
---
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/TestProbeDurableStateStoreQuery.scala
+++
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/TestProbeDurableStateStoreQuery.scala
@@ -42,7 +42,7 @@ class TestProbeDurableStateStoreQuery(
serialization: Serialization)(override implicit val system:
ExtendedActorSystem)
extends JdbcDurableStateStore[String](db, profile, durableStateConfig,
serialization)(system) {
- implicit val askTimeout = Timeout(100.millis)
+ implicit val askTimeout: Timeout = Timeout(100.millis)
override def getObject(persistenceId: String):
Future[GetObjectResult[String]] = ???
override def currentChanges(tag: String, offset: Offset):
Source[DurableStateChange[String], NotUsed] = ???
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]