protected new virtual void Given() { _projectionCheckpointStreamId = "$projections-projection-checkpoint"; _projectionCorrelationId = Guid.NewGuid(); _projection = new FakeCoreProjection(); _bus.Subscribe <CoreProjectionProcessingMessage.CheckpointCompleted>(_projection); _bus.Subscribe <CoreProjectionProcessingMessage.CheckpointLoaded>(_projection); _bus.Subscribe <CoreProjectionProcessingMessage.PrerecordedEventsLoaded>(_projection); _bus.Subscribe <CoreProjectionProcessingMessage.RestartRequested>(_projection); _bus.Subscribe <CoreProjectionProcessingMessage.Failed>(_projection); _bus.Subscribe <EventReaderSubscriptionMessage.ReaderAssignedReader>(_projection); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber <EventReaderSubscriptionMessage.CommittedEventReceived>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber <EventReaderSubscriptionMessage.CheckpointSuggested>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber <EventReaderSubscriptionMessage.EofReached>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber <EventReaderSubscriptionMessage.PartitionEofReached>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber <EventReaderSubscriptionMessage.PartitionMeasured>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber <EventReaderSubscriptionMessage.PartitionDeleted>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber <EventReaderSubscriptionMessage.ProgressChanged>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber <EventReaderSubscriptionMessage.NotAuthorized>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber <EventReaderSubscriptionMessage.ReaderAssignedReader>()); _checkpointHandledThreshold = 2; _checkpointUnhandledBytesThreshold = 5; _pendingEventsThreshold = 5; _maxWriteBatchLength = 5; _maximumAllowedWritesInFlight = 1; _emitEventEnabled = true; _checkpointsEnabled = true; _producesResults = true; _definesFold = true; _createTempStreams = false; _stopOnEof = false; NoStream(_projectionCheckpointStreamId); }
protected new virtual void Given() { _projectionCheckpointStreamId = "$projections-projection-checkpoint"; _projectionCorrelationId = Guid.NewGuid(); _projection = new FakeCoreProjection(); _bus.Subscribe <CoreProjectionProcessingMessage.CheckpointCompleted>(_projection); _bus.Subscribe <CoreProjectionProcessingMessage.CheckpointLoaded>(_projection); _bus.Subscribe <CoreProjectionProcessingMessage.PrerecordedEventsLoaded>(_projection); _bus.Subscribe <CoreProjectionProcessingMessage.RestartRequested>(_projection); _bus.Subscribe <CoreProjectionProcessingMessage.Failed>(_projection); _bus.Subscribe <EventReaderSubscriptionMessage.CommittedEventReceived>(_projection); _bus.Subscribe <EventReaderSubscriptionMessage.CheckpointSuggested>(_projection); _bus.Subscribe <EventReaderSubscriptionMessage.EofReached>(_projection); _bus.Subscribe <EventReaderSubscriptionMessage.ProgressChanged>(_projection); _bus.Subscribe <EventReaderSubscriptionMessage.NotAuthorized>(_projection); _checkpointHandledThreshold = 2; _checkpointUnhandledBytesThreshold = 5; _pendingEventsThreshold = 5; _maxWriteBatchLength = 5; _emitEventEnabled = true; _checkpointsEnabled = true; _createTempStreams = false; _stopOnEof = false; NoStream(_projectionCheckpointStreamId); }
protected new virtual void Given() { _projectionCheckpointStreamId = "$projections-projection-checkpoint"; _projectionCorrelationId = Guid.NewGuid(); _projection = new FakeCoreProjection(); _bus.Subscribe<CoreProjectionProcessingMessage.CheckpointCompleted>(_projection); _bus.Subscribe<CoreProjectionProcessingMessage.CheckpointLoaded>(_projection); _bus.Subscribe<CoreProjectionProcessingMessage.PrerecordedEventsLoaded>(_projection); _bus.Subscribe<CoreProjectionProcessingMessage.RestartRequested>(_projection); _bus.Subscribe<CoreProjectionProcessingMessage.Failed>(_projection); _bus.Subscribe<EventReaderSubscriptionMessage.ReaderAssignedReader>(_projection); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber<EventReaderSubscriptionMessage.CommittedEventReceived>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber<EventReaderSubscriptionMessage.CheckpointSuggested>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber<EventReaderSubscriptionMessage.EofReached>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber<EventReaderSubscriptionMessage.PartitionEofReached>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber<EventReaderSubscriptionMessage.PartitionMeasured>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber<EventReaderSubscriptionMessage.PartitionDeleted>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber<EventReaderSubscriptionMessage.ProgressChanged>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber<EventReaderSubscriptionMessage.NotAuthorized>()); _bus.Subscribe(_subscriptionDispatcher.CreateSubscriber<EventReaderSubscriptionMessage.ReaderAssignedReader>()); _checkpointHandledThreshold = 2; _checkpointUnhandledBytesThreshold = 5; _pendingEventsThreshold = 5; _maxWriteBatchLength = 5; _emitEventEnabled = true; _checkpointsEnabled = true; _producesResults = true; _definesFold = true; _createTempStreams = false; _stopOnEof = false; NoStream(_projectionCheckpointStreamId); }
public void it_can_be_created() { var coreProjection = new FakeCoreProjection(); var stateCache = new PartitionStateCache(); var bus = new InMemoryBus("test"); var fakeCheckpointManager = new specification_with_multi_phase_core_projection.FakeCheckpointManager(bus, Guid.NewGuid()); var it = new WriteQueryResultProjectionProcessingPhase( 1, "result-stream", coreProjection, stateCache, fakeCheckpointManager, fakeCheckpointManager); }
public void SetUp() { _stateCache = GivenStateCache(); _publisher = new InMemoryBus("test"); _coreProjection = new FakeCoreProjection(); _checkpointManager = new specification_with_multi_phase_core_projection.FakeCheckpointManager( _publisher, Guid.NewGuid()); _resultStreamName = "result-stream"; _phase = new WriteQueryResultProjectionProcessingPhase( 1, _resultStreamName, _coreProjection, _stateCache, _checkpointManager, _checkpointManager); When(); }
protected new virtual void Given() { _projectionCheckpointStreamId = "$projections-projection-checkpoint"; _projectionCorrelationId = Guid.NewGuid(); _projection = new FakeCoreProjection(); _projectionMode = ProjectionMode.Persistent; _checkpointHandledThreshold = 2; _checkpointUnhandledBytesThreshold = 5; _pendingEventsThreshold = 5; _maxWriteBatchLength = 5; _publishStateUpdates = true; _emitEventEnabled = true; _checkpointsEnabled = true; NoStream(_projectionCheckpointStreamId); }
protected new virtual void Given() { _projectionCheckpointStreamId = "$projections-projection-checkpoint"; _projectionCorrelationId = Guid.NewGuid(); _projection = new FakeCoreProjection(); _checkpointHandledThreshold = 2; _checkpointUnhandledBytesThreshold = 5; _pendingEventsThreshold = 5; _maxWriteBatchLength = 5; _emitEventEnabled = true; _checkpointsEnabled = true; _createTempStreams = false; _stopOnEof = false; NoStream(_projectionCheckpointStreamId); }
protected new virtual void Given() { _projectionCheckpointStreamId = "$projections-projection-checkpoint"; _projectionCorrelationId = Guid.NewGuid(); _projection = new FakeCoreProjection(); _projectionMode = ProjectionMode.Persistent; _checkpointHandledThreshold = 2; _checkpointUnhandledBytesThreshold = 5; _pendingEventsThreshold = 5; _maxWriteBatchLength = 5; _publishStateUpdates = true; _emitEventEnabled = true; _checkpointsEnabled = true; NoStream(_projectionCheckpointStreamId); }