public async Task should_have_no_parked_messages() { await _parked.Task; _messageParker.BeginMarkParkedMessagesReprocessed(2, () => { Assert.Zero(_messageParker.ParkedMessageCount); _done.TrySetResult(true); }); await _done.Task.WithTimeout(); }
protected override void Given() { base.Given(); AllWritesSucceed(); _replayParked = new TaskCompletionSource <bool>(); _messageParker = new PersistentSubscriptionMessageParker(_streamId, _ioDispatcher); _messageParker.BeginParkMessage(CreateResolvedEvent(0, 0), "testing", (_, __) => { _messageParker.BeginParkMessage(CreateResolvedEvent(1, 100), "testing", (_, __) => { _messageParker.BeginMarkParkedMessagesReprocessed(2, () => { _replayParked.SetResult(true); }); }); }); }