Remove warnings in persistence-tck (#27286)
This commit is contained in:
parent
51e443ec72
commit
88e6933ba0
4 changed files with 8 additions and 11 deletions
|
|
@ -20,14 +20,14 @@ object JournalPerfSpec {
|
|||
var counter = 0
|
||||
|
||||
override def receiveCommand: Receive = {
|
||||
case c @ Cmd("p", payload) =>
|
||||
case c @ Cmd("p", _) =>
|
||||
persist(c) { d =>
|
||||
counter += 1
|
||||
require(d.payload == counter, s"Expected to receive [$counter] yet got: [${d.payload}]")
|
||||
if (counter == replyAfter) replyTo ! d.payload
|
||||
}
|
||||
|
||||
case c @ Cmd("pa", payload) =>
|
||||
case c @ Cmd("pa", _) =>
|
||||
persistAsync(c) { d =>
|
||||
counter += 1
|
||||
require(d.payload == counter, s"Expected to receive [$counter] yet got: [${d.payload}]")
|
||||
|
|
@ -41,7 +41,7 @@ object JournalPerfSpec {
|
|||
}
|
||||
if (counter == replyAfter) replyTo ! payload
|
||||
|
||||
case c @ Cmd("n", payload) =>
|
||||
case Cmd("n", payload) =>
|
||||
counter += 1
|
||||
require(payload == counter, s"Expected to receive [$counter] yet got: [${payload}]")
|
||||
if (counter == replyAfter) replyTo ! payload
|
||||
|
|
|
|||
|
|
@ -7,13 +7,11 @@ package akka.persistence.journal
|
|||
import akka.persistence.scalatest.{ MayVerb, OptionalTests }
|
||||
|
||||
import scala.concurrent.duration._
|
||||
import scala.collection.immutable.Seq
|
||||
|
||||
import akka.actor._
|
||||
import akka.persistence._
|
||||
import akka.persistence.JournalProtocol._
|
||||
import akka.testkit._
|
||||
|
||||
import akka.util.unused
|
||||
import com.typesafe.config._
|
||||
|
||||
object JournalSpec {
|
||||
|
|
@ -68,7 +66,7 @@ abstract class JournalSpec(config: Config)
|
|||
* test case. `pid` is the `persistenceId` that will be used in the test.
|
||||
* This method may be needed to clean pre-existing events from the log.
|
||||
*/
|
||||
def preparePersistenceId(pid: String): Unit = ()
|
||||
def preparePersistenceId(@unused pid: String): Unit = ()
|
||||
|
||||
/**
|
||||
* Implementation may override and return false if it does not
|
||||
|
|
@ -79,7 +77,7 @@ abstract class JournalSpec(config: Config)
|
|||
def journal: ActorRef =
|
||||
extension.journalFor(null)
|
||||
|
||||
def replayedMessage(snr: Long, deleted: Boolean = false, confirms: Seq[String] = Nil): ReplayedMessage =
|
||||
def replayedMessage(snr: Long, deleted: Boolean = false): ReplayedMessage =
|
||||
ReplayedMessage(PersistentImpl(s"a-${snr}", snr, pid, "", deleted, Actor.noSender, writerUuid))
|
||||
|
||||
def writeMessages(fromSnr: Int, toSnr: Int, pid: String, sender: ActorRef, writerUuid: String): Unit = {
|
||||
|
|
@ -203,7 +201,7 @@ abstract class JournalSpec(config: Config)
|
|||
receiverProbe.expectMsg(replayedMessage(i))
|
||||
}
|
||||
|
||||
receiverProbe2.expectNoMsg(200.millis)
|
||||
receiverProbe2.expectNoMessage(200.millis)
|
||||
}
|
||||
|
||||
"not reset highestSequenceNr after message deletion" in {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ trait OptionalTests {
|
|||
if (flag.value)
|
||||
try test
|
||||
catch {
|
||||
case ex: Exception =>
|
||||
case _: Exception =>
|
||||
throw new AssertionError(
|
||||
"Implementation did not pass this spec. " +
|
||||
"If your journal will be (by definition) unable to abide the here tested rule, you can disable this test," +
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ object AkkaDisciplinePlugin extends AutoPlugin with ScalafixSupport {
|
|||
"akka-actor-typed-tests",
|
||||
"akka-bench-jmh",
|
||||
"akka-bench-jmh-typed",
|
||||
"akka-persistence-tck",
|
||||
"akka-stream-tests-tck")
|
||||
|
||||
val strictProjects = Set("akka-discovery", "akka-protobuf", "akka-coordination")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue