public async void ReIndex_MultiBatchOfDocsInSource_ReIndexesCorrectly( IFixture fixture, DbDataFlow <EsDocument, List <EsDocument> > reindexer, ISourceScrollConfig sourceConfig, ITargetIndexingConfig targetConfig) { // arange var testSourceClient = new EsTestIndexClient( GlobalTestSettings.TestSourceServerConnectionString, sourceConfig.IndexIdentifier); var testTargetClient = new EsTestIndexClient( GlobalTestSettings.TestTargetServerConnectionString, targetConfig.Index); testSourceClient.Index( fixture.CreateMany <EsDocument>(TEST_BATCH_SIZE * 3).ToArray()); // act using (testSourceClient.ForTestAssertions()) { await reindexer.StartFlowAsync(); } // assert using (testTargetClient.ForTestAssertions()) { testTargetClient.GetAllDocs().Should().HaveCount(6); } }
public EsScrollClient(ISourceScrollConfig config) { Contract.Requires(config != null); _config = config; var setting = new ConnectionSettings(new Uri(config.ServerConnectionString)); _client = new ElasticClient(setting); }