0

PersistenceTestKit has a constructor which takes a configuration object as an argument. This config seems to be ignored when it comes to custom journal implementation.

First of all, I have no interest in implementing a custom journal, but I can't figure out how to create a query for the default TestJournal.

So I thought I could implemented my own FakeJournal so I have full control over its data in my test.

That didn't work. I have defined a custom configuration for my journal and passed it to PersistenceTestKit, but the values are ignored or overwritten.

My config is parsed correctly, ie there are no errors and I can find all my values in the parsed result.

When I inspect the actual config via the Settings property, I can't see my custom configuration at all.

Does this mean there are certain values one cannot override for PersistenceTestKit?

If the TestJournal property cannot be overriden, is it even possible to get access to the TestJournal? Which messages does it support?

In the end, all I need is a query for the journal. Is it possible to create one for the current journal? For the test journal?

Thomas Eyde
  • 3,820
  • 2
  • 25
  • 32
  • Have you tried to set it up like ie. the persistence tests in akka.net repository? https://github.com/akkadotnet/akka.net/blob/dev/src/contrib/persistence/Akka.Persistence.Sqlite.Tests/SqliteJournalSpec.cs – Bartosz Sypytkowski Oct 19 '21 at 04:02
  • It seems like `PersistenceTestKit` overrides the config. When I reverted to `TestKit`, my passed config worked as expected. – Thomas Eyde Oct 22 '21 at 06:47

0 Answers0