public void TestFixtureSetUp() { _ioDispatcher = new IODispatcher(_bus, new PublishEnvelope(_bus), true); _projectionVersion = new ProjectionVersion(3, 1, 2); _projectionConfig = new ProjectionConfig(SystemAccounts.System, 10, 1000, 1000, 10, true, true, true, false, false, 5000, 10); _positionTagger = new MultiStreamPositionTagger(3, _streams); _positionTagger.AdjustTag(CheckpointTag.FromStreamPositions(3, new Dictionary <string, long> { { "a", 0 }, { "b", 0 }, { "c", 0 } })); _namingBuilder = ProjectionNamesBuilder.CreateForTest("projection"); IODispatcherTestHelpers.SubscribeIODispatcher(_ioDispatcher, _bus); _bus.Subscribe <ClientMessage.ReadStreamEventsBackward>(this); _coreProjectionCheckpointWriter = new CoreProjectionCheckpointWriter( _namingBuilder.MakeCheckpointStreamName(), _ioDispatcher, _projectionVersion, _projectionName); _checkpointManager = new MultiStreamMultiOutputCheckpointManager(_bus, _projectionId, _projectionVersion, SystemAccounts.System, _ioDispatcher, _projectionConfig, _projectionName, _positionTagger, _namingBuilder, true, true, false, _coreProjectionCheckpointWriter); When(); }
private void Given() { _projection = "projection"; _partitionAt = CheckpointTag.FromPosition(100, 50); _partition = "partition"; _namesBuilder = ProjectionNamesBuilder.CreateForTest(_projection); _re = new ResultEmitter(_namesBuilder); }
protected override void When() { // do not create _coreProjectionCheckpointWriter = new CoreProjectionCheckpointWriter( _namingBuilder.MakeCheckpointStreamName(), _ioDispatcher, _projectionVersion, _projectionName); _namingBuilder = ProjectionNamesBuilder.CreateForTest("projection"); }
public void setup() { Given(); _namingBuilder = ProjectionNamesBuilder.CreateForTest("projection"); _config = new ProjectionConfig(null, _checkpointHandledThreshold, _checkpointUnhandledBytesThreshold, _pendingEventsThreshold, _maxWriteBatchLength, _emitEventEnabled, _checkpointsEnabled, _createTempStreams, _stopOnEof, false, _trackEmittedStreams, _checkpointAfterMs, _maximumAllowedWritesInFlight); When(); }
public void setup() { Given(); _namingBuilder = ProjectionNamesBuilder.CreateForTest("projection"); _config = new ProjectionConfig(null, _checkpointHandledThreshold, _checkpointUnhandledBytesThreshold, _pendingEventsThreshold, _maxWriteBatchLength, _emitEventEnabled, _checkpointsEnabled, _createTempStreams, _stopOnEof, isSlaveProjection: false); When(); }
protected override void Given() { _ioDispatcher = new IODispatcher(_node.Node.MainQueue, new PublishEnvelope(_node.Node.MainQueue)); _node.Node.MainBus.Subscribe(_ioDispatcher.BackwardReader); _node.Node.MainBus.Subscribe(_ioDispatcher.ForwardReader); _node.Node.MainBus.Subscribe(_ioDispatcher.Writer); _node.Node.MainBus.Subscribe(_ioDispatcher.StreamDeleter); _node.Node.MainBus.Subscribe(_ioDispatcher.Awaker); _node.Node.MainBus.Subscribe(_ioDispatcher); _projectionNamesBuilder = ProjectionNamesBuilder.CreateForTest(_projectionName); _emittedStreamsTracker = new EmittedStreamsTracker(_ioDispatcher, new ProjectionConfig(null, 1000, 1000 * 1000, 100, 500, true, true, false, false, false, _trackEmittedStreams), _projectionNamesBuilder); _emittedStreamsDeleter = new EmittedStreamsDeleter(_ioDispatcher, _projectionNamesBuilder.GetEmittedStreamsName(), _projectionNamesBuilder.GetEmittedStreamsCheckpointName()); }
protected virtual void SetUp() { _ioDispatcher = new IODispatcher(_bus, new PublishEnvelope(_bus), true); _projectionNamesBuilder = ProjectionNamesBuilder.CreateForTest(_projectionName); _checkpointName = _projectionNamesBuilder.GetEmittedStreamsCheckpointName(); _deleter = new EmittedStreamsDeleter(_ioDispatcher, _projectionNamesBuilder.GetEmittedStreamsName(), _checkpointName); IODispatcherTestHelpers.SubscribeIODispatcher(_ioDispatcher, _bus); _bus.Subscribe <ClientMessage.ReadStreamEventsForward>(this); _bus.Subscribe <ClientMessage.ReadStreamEventsBackward>(this); _bus.Subscribe <ClientMessage.DeleteStream>(this); When(); }
protected override Task Given() { _ioDispatcher = new IODispatcher(_node.Node.MainQueue, new PublishEnvelope(_node.Node.MainQueue), true); _node.Node.MainBus.Subscribe(_ioDispatcher.BackwardReader); _node.Node.MainBus.Subscribe(_ioDispatcher.ForwardReader); _node.Node.MainBus.Subscribe(_ioDispatcher.Writer); _node.Node.MainBus.Subscribe(_ioDispatcher.StreamDeleter); _node.Node.MainBus.Subscribe(_ioDispatcher.Awaker); _node.Node.MainBus.Subscribe <IODispatcherDelayedMessage>(_ioDispatcher); _node.Node.MainBus.Subscribe <ClientMessage.NotHandled>(_ioDispatcher); _projectionNamesBuilder = ProjectionNamesBuilder.CreateForTest(_projectionName); _emittedStreamsTracker = new EmittedStreamsTracker(_ioDispatcher, new ProjectionConfig(null, 1000, 1000 * 1000, 100, 500, true, true, false, false, _trackEmittedStreams, 10000, 1), _projectionNamesBuilder); _emittedStreamsDeleter = new EmittedStreamsDeleter(_ioDispatcher, _projectionNamesBuilder.GetEmittedStreamsName(), _projectionNamesBuilder.GetEmittedStreamsCheckpointName()); return(Task.CompletedTask); }
public void setup() { _updateManager = new PartitionStateUpdateManager(ProjectionNamesBuilder.CreateForTest("projection")); _updateManager.StateUpdated("partition", new PartitionState("{\"state\":1}", null, _one), _zero); _updateManager.StateUpdated("partition", new PartitionState("{\"state\":2}", null, _two), _one); }
public void setup() { _namesBuilder = ProjectionNamesBuilder.CreateForTest("projection"); }
public void setup() { _updateManager = new PartitionStateUpdateManager(ProjectionNamesBuilder.CreateForTest("projection")); }
public void no_exceptions_are_thrown() { new PartitionStateUpdateManager(ProjectionNamesBuilder.CreateForTest("projection")); }
protected override void When() { // do not create _namingBuilder = ProjectionNamesBuilder.CreateForTest("projection"); }