public static Config Config(RedisFixture fixture, int id) { DbUtils.Initialize(fixture); return(ConfigurationFactory.ParseString($@" akka.loglevel = INFO akka.persistence.snapshot-store.plugin = ""akka.persistence.snapshot-store.redis"" akka.persistence.snapshot-store.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 }} }} akka.test.single-expect-default = 3s") .WithFallback(RedisPersistence.DefaultConfig())); }
public FetchedJobsWatcherFacts(RedisFixture Redis) { this.Redis = Redis; Prefix = Redis.Storage.Prefix; _cts = new CancellationTokenSource(); _cts.Cancel(); }
public WhenRunningThePopulatorWithNotFoundResponses( NotFoundRedisPopulatorFixture fixture, ITestOutputHelper xUnitLogger) : base(LastChangedList.CreateInMemoryContext()) { _fixture = fixture; _httpClientHandler = fixture.MockHttpClientHandler(Records); _redisBatch = RedisFixture.MockRedisBatch(); var logger = FakePopulatorRunnerLogger.CreateLogger(xUnitLogger); var redisStoreFactory = RedisFixture.MockStoreFactory(_redisBatch.Object); var configuration = fixture.MockConfiguration(); var runner = new PopulatorRunner( new FakeRepository(Context), redisStoreFactory, _httpClientHandler.Object, configuration, logger); runner.RunAsync(CancellationToken.None).GetAwaiter().GetResult(); for (var i = 0; i < 9; i++) { Thread.Sleep(2000); runner.RunAsync(CancellationToken.None).GetAwaiter().GetResult(); } }
public GivenABatchWasAlreadyStarted() { _sut = new RedisStore( RedisFixture.MockConnectionMultiplexer(RedisFixture.MockRedisBatch().Object), ETagFixture.MockETagGenerator()); _sut.CreateBatch(); }
public RedisQueryTest(RedisFixture fixture) { this.fixture = fixture; if (!isArranged) { fixture.ReloadTestDataAsync().Wait(); isArranged = true; } }
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())); }
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 {{ event-adapters {{ color-tagger = ""Akka.Persistence.TCK.Query.ColorFruitTagger, Akka.Persistence.TCK"" }} event-adapter-bindings = {{ ""System.String"" = color-tagger }} 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())); }
public RedisCurrentPersistenceIdsSpec(ITestOutputHelper output, RedisFixture fixture) : base(Config(fixture, Database), nameof(RedisCurrentPersistenceIdsSpec), output) { ReadJournal = Sys.ReadJournalFor <RedisReadJournal>(RedisReadJournal.Identifier); }
public RedisLockFacts(RedisFixture Redis) { this.Redis = Redis; }
public RedisMemoryGuidItemDistributedCacheMapFacts(RedisFixture redisFixture) { _redisFixture = redisFixture; }
public RedisJournalSerializationSpec(ITestOutputHelper output, RedisFixture fixture) : base(Config(fixture, Database), nameof(RedisJournalSerializationSpec), output) { }
public RedisWriteOnlyTransactionFacts(RedisFixture _Redis) { Redis = _Redis; Prefix = Redis.Storage.Prefix; }
public RedisMonitoringApiFacts(RedisFixture Redis) { this.Redis = Redis; Monitor = new RedisMonitoringApi(Redis.Storage); Prefix = Redis.Storage.Prefix; }
public RedisFetchedJobFacts(RedisFixture Redis) { _redis = Substitute.For<IDatabase>(); this.Redis = Redis; Prefix = Redis.Storage.Prefix; }
public RedisStorageFacts(RedisFixture Redis) { this.Redis = Redis; }
public RedisMemoryGuidItemOnDemandCacheMapFacts(RedisFixture fixture) { _fixture = fixture; }
public RedisRepositoryTest(RedisFixture fixture) { this.fixture = fixture; this.stockRepository = (StockRepository)fixture.DI.GetService <IRedisRepository <StockEntity> >(); }
public RedisConnectionFacts(RedisFixture Redis) { this.Redis = Redis; Prefix = Redis.Storage.Prefix; }
public RedisEventsByTagSpec(ITestOutputHelper output, RedisFixture fixture) : base(Config(fixture, Database), nameof(RedisEventsByTagSpec), output) { ReadJournal = Sys.ReadJournalFor <RedisReadJournal>(RedisReadJournal.Identifier); }
public SqlRedisFixture() { SqlConnectionFixture = new SqlServerFixture(); RedisFixture = new RedisFixture(); }
public GiveNoBatchWasStarted() { _sut = new RedisStore( RedisFixture.MockConnectionMultiplexer(RedisFixture.MockRedisBatch().Object), ETagFixture.MockETagGenerator()); }
public RedisSubscribeFacts(RedisFixture fixture) { this.fixture = fixture; }