Skip to content

Commit 5787de8

Browse files
authored
Merge branch 'master' into fix-lost-commited-events-by-leader-transfer
2 parents 0910f34 + 94d64eb commit 5787de8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/multi-jvm/scala/lerna/akka/entityreplication/typed/MultiSnapshotSyncSpec.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,17 @@ class MultiSnapshotSyncSpec extends MultiNodeSpec(MultiSnapshotSyncSpecConfig) w
242242
}
243243

244244
private def setValue(id: String, value: Int)(implicit timeout: Timeout): Int = {
245+
// NOTE:
246+
// Too short retryInterval (e.g.200ms) will cause premature compaction and make this test unstable
247+
// because also read-only operations create new LogEntry(NoOp) to guarantee consistency
245248
val entityRef = clusterReplication.entityRefFor(Register.TypeKey, id)
246-
val reply = AtLeastOnceComplete.askTo(entityRef, Register.Set(value, _), retryInterval = 200.millis)
249+
val reply = AtLeastOnceComplete.askTo(entityRef, Register.Set(value, _), retryInterval = 2.seconds)
247250
reply.await.value
248251
}
249252

250253
private def getValue(id: String)(implicit timeout: Timeout): Int = {
251254
val entityRef = clusterReplication.entityRefFor(Register.TypeKey, id)
252-
val reply = AtLeastOnceComplete.askTo(entityRef, Register.Get(_), retryInterval = 200.millis)
255+
val reply = AtLeastOnceComplete.askTo(entityRef, Register.Get(_), retryInterval = 2.seconds)
253256
reply.await.value
254257
}
255258

0 commit comments

Comments
 (0)