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/08/22 11:50:43 UTC
[incubator-pekko-persistence-cassandra] branch fix-tests updated (ff5a43b -> 04a8962)
This is an automated email from the ASF dual-hosted git repository.
nvollmar pushed a change to branch fix-tests
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-persistence-cassandra.git
discard ff5a43b wip
new 04a8962 wip
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (ff5a43b)
\
N -- N -- N refs/heads/fix-tests (04a8962)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/pekko/persistence/cassandra/query/EventsByTagSpec.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
[incubator-pekko-persistence-cassandra] 01/01: wip
Posted by nv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nvollmar pushed a commit to branch fix-tests
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-persistence-cassandra.git
commit 04a8962eb4c34ce5017ce17cdfc52a1d8fea2d57
Author: Nicolas Vollmar <nv...@scaling.ch>
AuthorDate: Tue Aug 22 13:27:16 2023 +0200
wip
---
.../cassandra/query/EventsByTagSpec.scala | 54 +++++++++++-----------
1 file changed, 26 insertions(+), 28 deletions(-)
diff --git a/core/src/test/scala/org/apache/pekko/persistence/cassandra/query/EventsByTagSpec.scala b/core/src/test/scala/org/apache/pekko/persistence/cassandra/query/EventsByTagSpec.scala
index f781760..251e353 100644
--- a/core/src/test/scala/org/apache/pekko/persistence/cassandra/query/EventsByTagSpec.scala
+++ b/core/src/test/scala/org/apache/pekko/persistence/cassandra/query/EventsByTagSpec.scala
@@ -108,12 +108,12 @@ object EventsByTagSpec {
pekko.persistence.cassandra.events-by-tag {
eventual-consistency-delay = 0s
# will test by requiring a new persistence-id search every 2s
- new-persistence-id-scan-timeout = 500ms
- cleanup-old-persistence-ids = 1s
+ new-persistence-id-scan-timeout = 1s
+ cleanup-old-persistence-ids = 2s
back-track {
// need to be smaller than the cleanup old persistence ids
- period = 800ms
- long-period = 850ms
+ period = 1500ms
+ long-period = 1700ms
}
}
""").withFallback(config)
@@ -1360,8 +1360,8 @@ object EventsByTagDisabledSpec {
class EventsByTagPersistenceIdCleanupSpec extends AbstractEventsByTagSpec(EventsByTagSpec.persistenceIdCleanupConfig) {
- private val newPersistenceIdScan: FiniteDuration = 500.millis
- private val cleanupPeriod: FiniteDuration = 1.second
+ private val newPersistenceIdScan: FiniteDuration = 1.second
+ private val cleanupPeriod: FiniteDuration = 2.second
private val logFilters = Set("cleanup-old-persistence-ids has been set")
@@ -1373,28 +1373,26 @@ class EventsByTagPersistenceIdCleanupSpec extends AbstractEventsByTagSpec(Events
"PersistenceId cleanup" must {
"drop state and trigger new persistence id lookup periodically" in {
// this test depends on new persistenceId can not happening at the wrong time...
- eventually(timeout(Span(30, Seconds))) {
- 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)
-
- val query =
- queries.eventsByTag("cleanup-tag",
- TimeBasedUUID(Uuids.startOf(t1.toInstant(ZoneOffset.UTC).toEpochMilli - 1L)))
- val probe = query.runWith(TestSink.probe[Any])
- probe.request(10)
- probe.expectNextPF { case e @ EventEnvelope(_, "cleanup", 1L, "cleanup-1") => e }
- // wait for persistence id cleanup
- probe.expectNoMessage(cleanupPeriod + 250.millis)
-
- // the metadata for pid cleanup should have been removed meaning the next event will be delayed
- val event2 = PersistentRepr(s"cleanup-2", 2, "cleanup")
- writeTaggedEvent(event2, Set("cleanup-tag"), 2, bucketSize)
-
- // we don't now when exactly the next persistence id scan will be
- probe.expectNoMessage(newPersistenceIdScan - 150.millis)
- probe.expectNextPF { case e @ EventEnvelope(_, "cleanup", 2L, "cleanup-2") => e }
- }
+ 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)
+
+ val query =
+ queries.eventsByTag("cleanup-tag",
+ TimeBasedUUID(Uuids.startOf(t1.toInstant(ZoneOffset.UTC).toEpochMilli - 1L)))
+ val probe = query.runWith(TestSink.probe[Any])
+ probe.request(10)
+ probe.expectNextPF { case e @ EventEnvelope(_, "cleanup", 1L, "cleanup-1") => e }
+ // wait for persistence id cleanup
+ probe.expectNoMessage(cleanupPeriod + 250.millis)
+
+ // the metadata for pid cleanup should have been removed meaning the next event will be delayed
+ val event2 = PersistentRepr(s"cleanup-2", 2, "cleanup")
+ writeTaggedEvent(event2, Set("cleanup-tag"), 2, bucketSize)
+
+ // we don't now when exactly the next persistence id scan will be
+ probe.expectNoMessage(newPersistenceIdScan - 150.millis)
+ probe.expectNextPF { case e @ EventEnvelope(_, "cleanup", 2L, "cleanup-2") => e }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org