public GapDetectorTest(ITestOutputHelper output) : base(output) { theStore.EnsureStorageExists(typeof(IEvent)); theGapDetector = new GapDetector(theStore.Events); _runner = new AutoOpenSingleQueryRunner(theStore.Tenancy.Default.Database); }
public HighWaterDetector(ISingleQueryRunner runner, EventGraph graph) { _runner = runner; _gapDetector = new GapDetector(graph); _safeSequenceFinder = new SafeSequenceFinder(graph); _highWaterStatisticsDetector = new HighWaterStatisticsDetector(graph); _updateStatus = new NpgsqlCommand($"select {graph.DatabaseSchemaName}.mt_mark_event_progression('{ShardState.HighWaterMark}', :seq);"); _newSeq = _updateStatus.AddNamedParameter("seq", 0L); }