public static Config Config(RedisFixture fixture, int id)
        {
            DbUtils.Initialize(fixture);

            return(ConfigurationFactory.ParseString($@"
                akka.test.single-expect-default = 3s
                akka.persistence {{
                    publish-plugin-commands = on
                    snapshot-store {{
                        plugin = ""akka.persistence.snapshot-store.redis""
                        redis {{
                            class = ""Akka.Persistence.Redis.Snapshot.RedisSnapshotStore, Akka.Persistence.Redis""
                            configuration-string = ""{fixture.ConnectionString}""
                            plugin-dispatcher = ""akka.actor.default-dispatcher""
                            database = ""{id}""
                        }}
                    }}
                }}
                akka.actor {{
                    serializers {{
                        persistence-snapshot = ""Akka.Persistence.Redis.Serialization.PersistentSnapshotSerializer, Akka.Persistence.Redis""
                    }}
                    serialization-bindings {{
                        ""Akka.Persistence.SelectedSnapshot, Akka.Persistence"" = persistence-snapshot
                    }}
                    serialization-identifiers {{
                        ""Akka.Persistence.Redis.Serialization.PersistentSnapshotSerializer, Akka.Persistence.Redis"" = 48
                    }}
                }}").WithFallback(RedisPersistence.DefaultConfig()));
        }
        public static Config Config(RedisFixture fixture, int id)
        {
            DbUtils.Initialize(fixture);

            return(ConfigurationFactory.ParseString($@"
            akka.loglevel = INFO
            akka.persistence.journal.plugin = ""akka.persistence.journal.redis""
            akka.persistence.journal.redis {{
                class = ""Akka.Persistence.Redis.Journal.RedisJournal, Akka.Persistence.Redis""
                plugin-dispatcher = ""akka.actor.default-dispatcher""
                configuration-string = ""{fixture.ConnectionString}""
                database = {id}
            }}
            akka.test.single-expect-default = 3s")
                   .WithFallback(RedisPersistence.DefaultConfig()));
        }
Example #3
0
 public static void Initialize(RedisFixture fixture)
 {
     ConnectionString = fixture.ConnectionString;
 }
 public RedisSnapshotStoreSpec(ITestOutputHelper output, RedisFixture fixture)
     : base(Config(fixture, Database), typeof(RedisSnapshotStoreSpec).Name, output)
 {
     RedisPersistence.Get(Sys);
     Initialize();
 }
 public RedisJournalSpec(ITestOutputHelper output, RedisFixture fixture) : base(Config(fixture, Database), nameof(RedisJournalSpec), output)
 {
     RedisPersistence.Get(Sys);
     Initialize();
 }
 public RedisJournalPerfSpec(ITestOutputHelper output, RedisFixture fixture) : base(Config(fixture, Database), nameof(RedisJournalPerfSpec), output)
 {
 }