You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by nv...@apache.org on 2023/03/10 12:36:56 UTC
[incubator-pekko-persistence-cassandra] branch main updated: -increases wiggle room to make test less flacky (#25)
This is an automated email from the ASF dual-hosted git repository.
nvollmar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-persistence-cassandra.git
The following commit(s) were added to refs/heads/main by this push:
new be17063 -increases wiggle room to make test less flacky (#25)
be17063 is described below
commit be17063dd4759837aa65f1cbda121a1f83ccd60f
Author: Nicolas Vollmar <nv...@gmail.com>
AuthorDate: Fri Mar 10 13:36:51 2023 +0100
-increases wiggle room to make test less flacky (#25)
---
.../akka/persistence/cassandra/query/EventsByTagSpec.scala | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/core/src/test/scala/akka/persistence/cassandra/query/EventsByTagSpec.scala b/core/src/test/scala/akka/persistence/cassandra/query/EventsByTagSpec.scala
index e4cdd01..926cebd 100644
--- a/core/src/test/scala/akka/persistence/cassandra/query/EventsByTagSpec.scala
+++ b/core/src/test/scala/akka/persistence/cassandra/query/EventsByTagSpec.scala
@@ -1357,10 +1357,10 @@ object EventsByTagDisabledSpec {
class EventsByTagPersistenceIdCleanupSpec extends AbstractEventsByTagSpec(EventsByTagSpec.persistenceIdCleanupConfig) {
- val newPersistenceIdScan: FiniteDuration = 500.millis
- val cleanupPeriod: FiniteDuration = 1.second
+ private val newPersistenceIdScan: FiniteDuration = 500.millis
+ private val cleanupPeriod: FiniteDuration = 1.second
- val logFilters = Set("cleanup-old-persistence-ids has been set")
+ private val logFilters = Set("cleanup-old-persistence-ids has been set")
override protected val logCheck: PartialFunction[Any, Any] = {
case m: Warning if !logFilters.exists(exclude => m.message.toString.contains(exclude)) => m
@@ -1368,7 +1368,7 @@ class EventsByTagPersistenceIdCleanupSpec extends AbstractEventsByTagSpec(Events
}
"PersistenceId cleanup" must {
- "drop state and trigger new persistence id lookup peridodically" in {
+ "drop state and trigger new persistence id lookup periodically" in {
val t1: LocalDateTime = LocalDateTime.now(ZoneOffset.UTC).minusDays(2)
val event1 = PersistentRepr(s"cleanup-1", 1, "cleanup")
writeTaggedEvent(t1, event1, Set("cleanup-tag"), 1, bucketSize)
@@ -1384,12 +1384,10 @@ class EventsByTagPersistenceIdCleanupSpec extends AbstractEventsByTagSpec(Events
val event2 = PersistentRepr(s"cleanup-2", 2, "cleanup")
writeTaggedEvent(event2, Set("cleanup-tag"), 2, bucketSize)
- probe.expectNoMessage(newPersistenceIdScan - 50.millis)
+ probe.expectNoMessage(newPersistenceIdScan - 100.millis) // we don't now when exactly the next persistence id scan will be
probe.expectNextPF { case e @ EventEnvelope(_, "cleanup", 2L, "cleanup-2") => e }
-
}
}
-
}
class EventsByTagDisabledSpec extends AbstractEventsByTagSpec(EventsByTagSpec.disabledConfig) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org