Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1051 async OnEventAppeared #1310

Merged

Conversation

rodolfograve
Copy link
Contributor

@rodolfograve rodolfograve commented May 22, 2017

Following from the discussions on #1051, this is a PR to support async OnEventAppeared.

This probably doesn't solve all the problems described in all the related issues (#861, #1051, #1179) but should at least allow real async OnEventAppeared handlers, i.e. give the client the ability to use async APIs without blocking at any point.

I have checked that all existing tests pass, and that our own real life applications runs correctly using this modified version.

API breaking changes:

  1. OnEventAppeared is now a Func<T, ResolvedEvent, Task>
  2. CatchUpSubscription.Start is now StartAsync

Please, let me know if there are improvements you require in order to get this PR approved.

Further improvements, which I'd be happy to work on as separate PRs if you'd be willing to consider them:

  1. Replace more of the existing TaskCompletionSource-based and manual ThreadPool with async/await. Taking this all the way down to the SocketAsyncEventArgs would help simplify the code, leaving a lot of the current complexity to the language/compiler by means of async/await
  2. The above should also help with scalability in cases where GetEventStore is sharing the Thread Pool with other components (OWIN, SignalR, other EventStore connections, etc.)
  3. Modernizing the code base to use more C#6 features like auto-implemented properties, coalesce and conditional operators, expression bodied functions, etc. This would help with readability. I understand why the team wouldn't want to spend some time on this (no clear value added) but perhaps the value proposition is different if an external person does it.

@gregoryyoung
Copy link
Contributor

gregoryyoung commented May 22, 2017 via email

@rodolfograve
Copy link
Contributor Author

@gregoryyoung I believe so. Perhaps something like this:

  1. Add an overload that accepts the original Action<EventStoreCatchUpSubscription, ResolvedEvent> and converts it into a Func<EventStoreCatchUpSubscription, ResolvedEvent, Task>:
() =>
{
  action();
  return Task.CompletedTask;
}

This solution would be backwards compatible and wouldn't add much extra cost for people that use Action, since Task.CompletedTask doesn't do any allocation and awaiting a completed task has a very small CPU cost.

  1. Just obsolete the current .Start and add the new StartAsync

Let me know if this would be acceptable to you.

PS. I'm also looking into the failed build. I remember reading somewhere that you no longer wanted to remain compatible with Mono. Can you please let me know if the build-mono4 is required to pass?

@rodolfograve
Copy link
Contributor Author

Apologies for the messy commits. Somehow I managed to merge my first failed issue1051-async-client-api-improvements branch into the "good" one "1051-async-eventAppeared". On the failed one I had applied some unnecessary changes that are now breaking the build.

@hayley-jean
Copy link
Member

Thanks for the PR @rodolfograve

We still support mono, we just no longer support mono3, so build-mono4 does still need to pass.
It looks like it's now the same tests failing on both builds, though, so fixing one should fix the other.

Just in case you weren't aware, you are able to run these same tests locally by running the scripts run_tests.cmd or run_tests.sh

@rodolfograve
Copy link
Contributor Author

rodolfograve commented May 23, 2017

Ah, great @hayley-jean Between not being able to build using the same version of the compiler, and the tests, I was getting a bit frustrated at the very long feedback loop with this :-)

Thanks!

@pgermishuys
Copy link
Contributor

@rodolfograve after looking through your commits this morning, it would appear that the appveyor build command was missing the SpecificVisualStudioVersion flag which has now been updated.

Apologies for the frustration this has caused you.

@rodolfograve
Copy link
Contributor Author

Thanks @pgermishuys

Copy link
Contributor

@pgermishuys pgermishuys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick scan over the PR which requires a detailed look through I just made some comments on things that can be removed.

@@ -58,6 +58,9 @@
<Name>EventStore.Common</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not crucial, but this was likely added by Visual Studio.

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file can safely be removed.

@@ -0,0 +1,19 @@
using System.Threading.Tasks;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file can safely be removed, as well as the reference to it in the ClientAPI.

@@ -68,11 +68,13 @@
<Compile Include="ConditionalWriteFailureReason.cs" />
<Compile Include="ConditionalWriteResult.cs" />
<Compile Include="ConnectionString.cs" />
<Compile Include="Delegates.cs" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See note above about removing this file.

@@ -0,0 +1 @@
<Playlist Version="1.0"><Add Test="EventStore.Core.Tests.TransactionLog.when_having_scavenged_tfchunk_with_all_records_removed.first_record_was_written" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.PinnedConsumerStrategyTests.bad_availablecapacity_scneanrio_causing_null_reference" /><Add Test="EventStore.BufferManagement.Tests.when_writing_multiple_bytes.a_null_byte_array_throws_an_argumentnullexception" /><Add Test="EventStore.Projections.Core.Tests.Services.core_service.when_unsubscribing_a_subscribed_projection.committed_events_are_no_longer_distributed_to_the_projection" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.projection_checkpoint.when_emitting_events_the_non_started_checkpoint.does_not_publish_write_events" /><Add Test="EventStore.Core.Tests.Http.Users.users.when_resetting_a_password.can_change_password_using_the_new_password" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_system_no_acl_stream_with_no_user_is_not_allowed" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.stream_position_tagger.when_updating_postion_stream_position_tracker.cannot_update_to_the_same_postion" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.with_too_big_max_count.backward_range_read_returns_all_records" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.delete_of_all_is_never_allowed" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_resetting_the_password_twice.configures_password_changed_notification_system_stream_only_once" /><Add Test="EventStore.Core.Tests.TransactionLog.when_creating_chunked_transaction_chaser.a_null_file_config_throws_argument_null_exception" /><Add Test="EventStore.Core.Tests.TransactionLog.when_writing_a_memorymappedpoint_to_a_file.a_null_file_throws_argumentnullexception" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.stream_security_inheritance.acl_inheritance_is_working_properly_on_system_streams" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_normal_all_stream_with_existing_user_is_allowed" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.reset_password.empty_user_name_throws" /><Add Test="EventStore.Core.Tests.Services.Storage.CheckCommitStartingAt.when_writing_few_prepares_with_same_expected_version_and_not_committing_them.every_prepare_can_be_commited" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.creating_a_user.creating_a_user_with_parameters_can_be_read" /><Add Test="EventStore.Core.Tests.ClientAPI.update_existing_persistent_subscription_with_subscribers.existing_subscriptions_are_dropped" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.OutstandingMessageCacheTests.can_remove_duplicate" /><Add Test="EventStore.Core.Tests.TransactionLog.when_creating_tfchunk_from_empty_file.append_does_not_throw_exception" /><Add Test="EventStore.Projections.Core.Tests.Services.checkpoint_tag.checkpoint_tag_phase.equal_operator" /><Add Test="EventStore.Core.Tests.TransactionLog.when_reading_logical_bytes_bulk_from_a_chunk.a_read_on_new_file_can_be_performed_but_returns_nothing" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_creating_a_user.creates_an_enabled_user_account_with_the_correct_password" /><Add Test="EventStore.BufferManagement.Tests.when_setting_the_length_of_the_pool.a_larger_length_makes_capacity_larger" /><Add Test="EventStore.Core.Tests.TransactionLog.when_sequentially_reading_db_with_one_chunk.all_records_could_be_read_with_forward_pass" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.when_deleting_a_persistent_projection_and_not_authorised.a_projection_deleted_event_is_not_written" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.when_the_projection_with_pending_writes_is_stopped.a_projection_checkpoint_event_is_published" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.change_password.empty_username_throws" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.enable_disable_user.can_enable_disable_user" /><Add Test="EventStore.Core.Tests.Services.Transport.Tcp.core_tcp_package.authorized_with_empty_data_should_serialize_and_deserialize_correctly" /><Add Test="EventStore.Core.Tests.Index.IndexV2.index_map_should.allow_commit_checkpoint_equal_to_minus_one_if_no_ptables_are_in_index" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.transaction_file_position_tagger.transaction_file_position_tagger.adjust_compatible_tag_returns_the_same_tag" /><Add Test="EventStore.Core.Tests.Services.Replication.DeleteStream.when_delete_stream_gets_stream_deleted.failed_request_message_is_publised" /><Add Test="EventStore.Core.Tests.AwakeService.when_handling_committed_event_after_unsybscribe.does_not_awake_stream_subscriber_before_position" /><Add Test="EventStore.Core.Tests.ClientAPI.subscribe_to_all_should.allow_multiple_subscriptions" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_beginning_to_load_state_the_core_projection_checkpoint_manager.event_processed_throws_invalid_operation_exception" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.when_the_state_handler_with_configured_state_stream_does_process_an_event_the_projection_should.emit_a_state_updated_event" /><Add Test="EventStore.Core.Tests.ClientAPI.read_event_stream_backward_should.be_able_to_read_last_event" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state_update_manager.when_two_states_were_updated.emit_events_writes_correct_state_data" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.Security.authorized_default_credentials_security.all_operations_succeeds_when_passing_no_explicit_credentials" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_normal_no_acl_stream_with_existing_user_is_allowed" /><Add Test="EventStore.Projections.Core.Tests.Services.projection_subscription.when_handling_duplicate_events.duplicates_are_not_passed_to_downstream_handler" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.when_having_max_count_set_for_stream.after_setting_less_strict_max_count_read_stream_forward_reads_more_events" /><Add Test="EventStore.Core.Tests.TransactionLog.Validation.when_validating_tfchunk_db_with_multi_chunks.does_not_allow_checkpoint_to_point_into_the_middle_of_multichunk_chunk" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_handling_read_completed_then_pause_then_eof.does_not_publish_schedule" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.NAKTests.explicit_nak_with_retry_retries_the_message" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.AfterScavenge.when_having_stream_with_maxage_specified.forward_range_read_doesnt_return_expired_records" /><Add Test="EventStore.Core.Tests.AwakeService.when_handling_committed_event_with_subscribers.does_not_awake_stream_subscriber_after_position" /><Add Test="EventStore.BufferManagement.Tests.when_writing_multiple_bytes.can_write_given_a_self_offset" /><Add Test="EventStore.Core.Tests.Bus.when_subscribing_to_memory_bus.but_not_publishing_messages_noone_should_handle_any_messages" /><Add Test="EventStore.Projections.Core.Tests.Other.url_segments.are_not_automatically_unescaped2" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.multi_stream_reader.when_onetime_reader_handles_eof.does_not_publish_read_messages_anymore" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_into_the_middle_of_scavenged_chunk_with_index_in_memory_and_then_reopening_db.checksums_should_be_equal_to_beginning_of_intersected_scavenged_chunk" /><Add Test="EventStore.Core.Tests.TransactionLog.when_writing_an_existing_chunked_transaction_file_with_checksum_and_data_bigger_than_buffer.a_record_can_be_written" /><Add Test="EventStore.Core.Tests.Http.Streams.feed.when_retrieving_feed_head.contains_a_link_rel_previous" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.Security.authorized_default_credentials_security.all_operations_are_not_authenticated_when_overriden_with_not_existing_credentials" /><Add Test="EventStore.Core.Tests.Services.Transport.Http.naive_uri_router_should.detect_duplicate_route" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state_update_manager.when_state_updated_twice.emit_events_writes_single_state_updated_event" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state_update_manager.when_state_updated.emit_events_writes_single_state_updated_event" /><Add Test="EventStore.Projections.Core.Tests.Services.checkpoint_tag.checkpoint_tag_phase.equal_equals" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.event_by_type_index_position_tagger.event_by_type_index_position_tagger.cannot_update_by_prior_tf_position" /><Add Test="EventStore.Projections.Core.Tests.Services.emitted_stream.when_handling_an_emit_with_committed_callback.completes_already_published_events" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.when_having_stream_both_maxage_and_maxcount_specified_with_maxage_more_strict.backward_range_read_doesnt_return_expired_records" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_changing_a_password_with_incorrect_current_password.does_not_update_details" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.when_having_stream_both_maxage_and_maxcount_specified_with_maxage_more_strict.forward_range_read_doesnt_return_expired_records" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_resuming_stream_event_reader.can_handle_read_events_completed" /><Add Test="EventStore.Core.Tests.TransactionLog.when_creating_chunked_transaction_file_reader.a_null_db_config_throws_argument_null_exception" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_updating_user_details.does_not_change_password" /><Add Test="EventStore.Core.Tests.Index.IndexV2.adding_two_items_to_empty_index_map_with_two_tables_per_level_causes_merge.a_merged_file_was_created" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.with_too_big_truncatebefore.backward_range_read_returns_all_records" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_few_chunks_with_index_on_disk_and_then_reopening_db.checksums_should_be_equal_to_ack_checksum" /><Add Test="EventStore.Projections.Core.Tests.Services.result_emitter.result_emitter+when_result_updated_on_root_partition.emits_result_event" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state_update_manager.when_state_updated_twice.emit_events_writes_event_with_correct_expected_tag" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.multistream_position_tagger.multistream_position_tagger.adjust_compatible_tag_returns_the_same_tag" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.PinnedConsumerStrategyTests.available_capacity_is_tracked_with_inflight_messages" /><Add Test="EventStore.Projections.Core.Tests.ClientAPI.with_standard_projections_running.when_soft_deleting_stream.deleted_stream_events_are_indexed" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_beginning_to_load_state_the_core_projection_checkpoint_manager.cannot_be_started_from_incompatible_checkpoint_tag" /><Add Test="EventStore.Core.Tests.ClientAPI.subscribe_to_all_should.catch_deleted_events_as_well" /><Add Test="EventStore.Core.Tests.ClientAPI.subscribe_to_stream_catching_up_should.allow_multiple_subscriptions_to_same_stream" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_to_the_very_beginning_of_multichunk_db.chaser_checkpoint_should_be_adjusted_if_less_than_actual_truncate_checkpoint" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.specific_event_event_filter.does_not_pass_categorized_event_with_correct_event_name" /><Add Test="EventStore.Core.Tests.ClientAPI.when_having_truncatebefore_set_for_stream.after_setting_less_strict_truncatebefore_read_stream_backward_reads_more_events" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.when_having_stream_with_maxage_specified.forward_range_read_doesnt_return_expired_records" /><Add Test="EventStore.Core.Tests.TransactionLog.when_opening_existing_tfchunk.append_throws_invalid_operation_exception" /><Add Test="EventStore.Core.Tests.ClientAPI.SystemData.clientapi_tcp_package.authorized_with_data_should_serialize_and_deserialize_correctly" /><Add Test="EventStore.Core.Tests.Index.IndexV2.adding_four_items_to_empty_index_map_with_two_tables_per_level_causes_double_merge.a_merged_file_was_created" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.when_creating_a_projection.a_checkpoint_threshold_less_tan_checkpoint_handled_threshold_throws_argument_out_of_range_exception" /><Add Test="EventStore.Core.Tests.TransactionLog.when_reading_logical_bytes_bulk_from_a_chunk.a_read_past_end_of_completed_chunk_does_not_include_footer" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.multi_stream_reader.when_handling_read_completed_for_all_streams.cannot_be_paused" /><Add Test="EventStore.Projections.Core.Tests.Services.staged_processing_queue+when_changing_correlation_id_on_unordered_stage.first_task_starts_on_second_stage_on_first_stage_completion" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.when_committing_empty_transaction.committing_first_event_with_expected_version_no_stream_is_idempotent" /><Add Test="EventStore.Core.Tests.TransactionLog.Scavenging.when_having_stream_with_strict_max_age_leaving_no_events_in_stream.expired_prepares_are_scavenged_but_the_last_in_stream_is_physically_kept" /><Add Test="EventStore.BufferManagement.Tests.when_reading_multiple_bytes.a_count_larger_than_the_buffer_throws_an_argumentoutofrangeexception" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.AfterScavenge.when_having_stream_both_maxage_and_maxcount_specified_with_maxage_more_strict.backward_range_read_doesnt_return_expired_records" /><Add Test="EventStore.Core.Tests.Http.Streams.feed.when_retrieving_feed_head.contains_a_link_rel_next" /><Add Test="EventStore.Core.Tests.Index.IndexV3.adding_item_to_empty_index_map.a_merged_file_was_not_created" /><Add Test="EventStore.Core.Tests.Services.TimeService.time_service_should.fire_all_timeouts_that_are_scheduled_at_same_time" /><Add Test="EventStore.BufferManagement.Tests.when_converting_to_an_effective_IEnumerable_of_arraysegments.a_single_partial_segment_can_be_returned" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.when_having_one_stream_with_maxage_and_other_stream_with_maxcount_and_streams_have_same_hash.backward_range_read_doesnt_return_expired_records_for_stream_1" /><Add Test="EventStore.Projections.Core.Tests.Services.emitted_stream.when_handling_an_emit_with_stream_metadata_to_empty_stream.does_not_reply_with_write_completed_message" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.with_big_max_age.backward_range_read_returns_all_records" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_creating_a_default_checkpoint_manager.empty_projection_checkpoint_stream_id_throws_argument_exception" /><Add Test="EventStore.Projections.Core.Tests.Services.checkpoint_tag.checkpoint_tag_by_event_type_index_positions.equal_equals" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.subscribe_to_stream_catching_up_should.filter_events_and_keep_listening_to_new_ones" /><Add Test="EventStore.Core.Tests.ClientAPI.subscribe_to_stream_catching_up_should.filter_events_and_keep_listening_to_new_ones" /><Add Test="EventStore.Core.Tests.TransactionLog.Validation.when_validating_tfchunk_db.allows_last_chunk_to_be_not_completed_when_checksum_is_exactly_in_between_two_chunks_and_no_next_chunk_exists" /><Add Test="EventStore.Projections.Core.Tests.Services.checkpoint_tag.checkpoint_tag_by_catalog_stream.equal_operator" /><Add Test="EventStore.Core.Tests.ClientAPI.read_all_events_forward_with_soft_deleted_stream_should.ensure_deleted_stream" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_a_core_projection_checkpoint_manager_has_been_created.can_be_started" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_system_user_stream_with_not_authorized_user_is_not_allowed" /><Add Test="EventStore.Core.Tests.AwakeService.when_handling_committed_event_with_subscribers.awakes_stream_subscriber_before_position" /><Add Test="EventStore.BufferManagement.Tests.when_reading_multiple_bytes.a_null_read_buffer_throws_an_argumentnullexception" /><Add Test="EventStore.BufferManagement.Tests.when_reading_multiple_bytes.can_read_within_a_single_buffer_with_no_offset" /><Add Test="EventStore.Core.Tests.Services.Transport.Http.Authentication.basic_http_authentication_provider.when_handling_a_request_without_an_authorization_header.does_not_publish_authenticated_http_request_message" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.managed_projection.when_creating_a_managed_projection.empty_name_throws_argument_exception" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_starting_the_core_projection_checkpoint_manager.accepts_event_processed" /><Add Test="EventStore.Core.Tests.Services.Storage.when_caching_read_items.cache_removes_oldest_item_when_max_size_reached_by_data" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.managed_projection.when_starting_a_managed_projection_without_slave_projections.does_not_publish_start_slave_projections_message" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_suggested+when_the_checkpoint_is_suggested.a_projection_checkpoint_event_is_published" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.creating_a_user.creating_a_user_with_empty_name_throws" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.AfterScavenge.when_having_stream_with_maxage_specified.backward_range_read_doesnt_return_expired_records" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_starting_the_core_projection_checkpoint_manager.accepts_stopped" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state_update_manager.when_state_updated_twice.emit_events_writes_event_with_correct_caused_by_tag" /><Add Test="EventStore.BufferManagement.Tests.when_reading_multiple_bytes.count_and_offset_together_lerger_than_buffer_throws_an_argumentoutofrangeexception" /><Add Test="EventStore.Core.Tests.Services.Transport.Http.accept_element_must.contain_value" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_a_checkpoint_has_been_completed_and_requesting_checkpoint_to_stop.does_not_throw" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.when_creating_a_projection.a_null_input_queue_throws_exception" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.when_committing_empty_transaction.following_append_with_expected_version_any_are_commited_correctly" /><Add Test="EventStore.Projections.Core.Tests.Services.staged_processing_queue+when_enqueuing_three_async_async_sync_step_tasks_and_they_complete_starting_from_second.first_task_keeps_other_blocked_at_stage_two" /><Add Test="EventStore.Core.Tests.Services.Storage.Transactions.when_having_two_intermingled_transactions_and_some_uncommited_prepares_in_the_end_read_index_should.all_records_can_be_read_sequentially_page_by_page_in_backward_pass" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_handling_read_completed_and_eof.cannot_be_resumed" /><Add Test="EventStore.Core.Tests.ClientAPI.connection_string.can_set_mixed_case" /><Add Test="EventStore.Core.Tests.ClientAPI.subscribe_to_stream_catching_up_should.be_able_to_subscribe_to_non_existing_stream" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.TimeoutTests.disable_timeout_doesnt_timeout" /><Add Test="EventStore.Core.Tests.Index.IndexV1.index_map_should.allow_prepare_checkpoint_equal_to_minus_one_if_no_ptables_are_in_index" /><Add Test="EventStore.Projections.Core.Tests.Other.can_serialize_and_deserialize.can_deserialize_readonly_fields" /><Add Test="EventStore.Core.Tests.Services.Transport.Http.workspace_must.contain_title" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state.partition_state+can_be_deserialized_from_serialized_form.array" /><Add Test="EventStore.Core.Tests.Services.Storage.Scavenge.when_scavenging_tfchunk_with_version0_log_records_using_transactions.all_records_can_be_read_sequentially_page_by_page_in_backward_pass" /><Add Test="EventStore.Core.Tests.Index.IndexV3.when_trying_to_get_oldest_entry.correct_entry_is_returned" /><Add Test="EventStore.Core.Tests.Http.BasicAuthentication.basic_authentication.when_requesting_an_unprotected_resource.does_not_return_www_authenticate_header" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_ordinary_user_attempts_to_update_its_own_details.does_not_change_password" /><Add Test="EventStore.BufferManagement.Tests.when_a_buffer_pool_has_been_disposed.converting_to_a_byte_array_throws_objectdisposedexception" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.heading_event_reader.when_the_heading_event_reader_handles_an_event.cannot_handle_previous_event" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.transactional_write_stream_security.committing_transaction_with_not_existing_credentials_is_not_authenticated" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_starting_the_core_projection_checkpoint_manager.accepts_checkpoint_suggested_even_at_the_start_position_but_does_not_complete_it" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_normal_user_stream_with_no_user_is_not_allowed" /><Add Test="EventStore.Projections.Core.Tests.Services.emitted_stream.when_checkpoint_requested.checkpoint_throws_invalid_operation_exception" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.creating_a_user.creating_a_user_with_empty_username_throws" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_into_the_middle_of_completed_chunk.chaser_checkpoint_should_be_adjusted_if_less_than_actual_truncate_checkpoint" /><Add Test="EventStore.BufferManagement.Tests.when_reading_multiple_bytes.can_read_using_an_offset" /><Add Test="EventStore.Core.Tests.Http.Streams.when_getting_description_document_and_subscription_exists_for_stream.contains_the_subscription_link" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.empty_event_filter.cannot_be_built" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.read_all_events_forward_should.be_able_to_read_all_one_by_one_until_end_of_stream" /><Add Test="EventStore.Core.Tests.ClientAPI.read_all_events_forward_should.be_able_to_read_events_slice_at_time" /><Add Test="EventStore.BufferManagement.Tests.when_creating_a_buffer_manager.a_negative_number_of_segments_causes_an_argumentexception" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_normal_all_stream_with_no_user_is_allowed" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.multistream_position_tagger.when_updating_postion_multistream_position_tracker.cannot_update_to_the_same_postion" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.read_event_stream_backward_should.be_able_to_read_slice_from_arbitrary_position" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state_update_manager.when_two_states_were_updated.emit_events_writes_to_correct_streams" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.read_event_stream_forward_should.be_able_to_read_slice_from_arbitrary_position" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.enable_disable_user.enable_null_username_throws" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.multi_stream_reader.when_handling_read_completed_and_no_stream.can_handle_following_read_events_completed" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.PinnedConsumerStrategyTests.events_are_skipped_if_assigned_client_full" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.heading_event_reader.when_the_heading_event_reader_handles_an_event.can_handle_next_event" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.specific_event_event_filter.does_not_pass_categorized_event_with_incorrect_event_name" /><Add Test="EventStore.Core.Tests.Services.Storage.when_caching_read_items.cache_removes_oldest_item_when_max_count_reached" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_a_core_projection_checkpoint_manager_has_been_created.checkpoint_suggested_throws_invalid_operation_exception" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_system_admin_stream_with_admin_user_is_allowed" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_database.everything_should_go_fine" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.change_password.empty_current_password_throws" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.when_having_truncatebefore_set_for_stream.after_setting_less_strict_truncatebefore_read_event_reads_more_events" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.multistream_position_tagger.multistream_position_tagger.another_streams_checkpoint_tag_is_incompatible" /><Add Test="EventStore.Core.Tests.ClientAPI.when_having_max_count_set_for_stream.after_setting_more_strict_max_count_read_stream_backward_reads_less_events" /><Add Test="EventStore.Core.Tests.TransactionLog.Validation.when_validating_tfchunk_db.allows_with_exactly_enough_file_to_reach_checksum" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.when_creating_a_projection.a_null_io_dispatcher__throws_argument_null_exception" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.read_all_events_backward_should.be_able_to_read_events_slice_at_time" /><Add Test="EventStore.Core.Tests.Index.HashListMemTableTests.can_do_range_query_of_existing_items_with_duplicates_on_edges" /><Add Test="EventStore.Core.Tests.TransactionLog.Validation.when_validating_tfchunk_db_with_multi_chunks.allows_next_new_chunk_when_checksum_is_exactly_in_between_two_chunks_if_last_is_ongoing_chunk" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_deleting_an_existing_user_account.deletes_the_user_account" /><Add Test="EventStore.Core.Tests.ClientAPI.connection_string.can_set_string_value" /><Add Test="EventStore.Projections.Core.Tests.Services.emitted_stream.when_handling_an_emit_the_started_in_recovery_stream.does_not_reply_with_write_completed_message" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_normal_user_stream_with_authorized_user_is_allowed" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.when_posting_a_persistent_projection.a_projection_created_event_is_written" /><Add Test="EventStore.Core.Tests.Services.Replication.TransactionCommit.when_transaction_commit_gets_commit_timeout_before_final_commit.failed_request_message_is_publised" /><Add Test="EventStore.Projections.Core.Tests.Services.checkpoint_tag.checkpoint_tag_by_phase.equal_operator" /><Add Test="EventStore.Core.Tests.ClientAPI.read_all_events_forward_with_hard_deleted_stream_should.ensure_deleted_stream" /><Add Test="EventStore.Core.Tests.TransactionLog.when_writing_a_new_chunked_transaction_file.a_record_can_be_written" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_system_no_acl_stream_with_admin_user_is_allowed" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.specific_category_event_filter.can_be_built" /><Add Test="EventStore.Projections.Core.Tests.ClientAPI.with_standard_projections_running.when_soft_deleting_stream_and_starting_standard_projections.deleted_stream_events_are_indexed" /><Add Test="EventStore.Core.Tests.Http.PersistentSubscription.when_retrieving_an_empty_feed.contains_a_link_rel_previous" /><Add Test="EventStore.Core.Tests.Index.HashListMemTableTests.adding_an_item_increments_count" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.reset_password.can_reset_password" /><Add Test="EventStore.Core.Tests.TransactionLog.Validation.when_validating_tfchunk_db.allows_no_files_when_checkpoint_is_zero" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_normal_no_acl_stream_with_no_user_is_allowed" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.subscribe_to_stream_catching_up_should.call_dropped_callback_when_an_error_occurs_while_processing_an_event" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.specific_event_event_filter.does_not_pass_uncategorized_event_with_incorrect_event_name" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.subscribe_should.allow_multiple_subscriptions_to_same_stream" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.subscribe_to_stream_catching_up_should.allow_multiple_subscriptions_to_same_stream" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.OutstandingMessageCacheTests.can_remove_non_existing_item" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_normal_no_acl_stream_with_admin_user_is_allowed" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.deleting_a_user.deleting_non_existing_user_throws" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.all_stream_with_no_acl_security.delete_of_all_is_never_allowed" /><Add Test="EventStore.BufferManagement.Tests.when_writing_multiple_bytes.can_write_given_a_source_offset" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.Security.authorized_default_credentials_security.all_operations_are_not_authorized_when_overriden_with_not_authorized_credentials" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.transactional_write_stream_security.committing_transaction_to_stream_with_no_credentials_is_denied" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.when_posting_a_persistent_projection_and_writes_succeed.a_projection_updated_message_is_published" /><Add Test="EventStore.Projections.Core.Tests.Services.staged_processing_queue+when_enqueuing_two_two_step_tasks_and_the_second_completes_first.first_task_completed_unblocks_both_tasks" /><Add Test="EventStore.Core.Tests.Services.Storage.Transactions.when_having_two_intermingled_transactions_spanning_few_chunks_read_index_should.all_records_can_be_read_sequentially_page_by_page_in_backward_pass" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.subscribe_should.be_able_to_subscribe_to_non_existing_stream_and_then_catch_new_event" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_multiple_event_processed_received_the_core_projection_checkpoint_manager.event_processed_at_the_start_position_throws_invalid_operation_exception" /><Add Test="EventStore.Core.Tests.Services.Replication.WriteStream.when_write_stream_gets_commit_timeout_before_final_commit.failed_request_message_is_publised" /><Add Test="EventStore.Core.Tests.TransactionLog.when_creating_chunked_transaction_chaser.a_null_writer_checksum_throws_argument_null_exception" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.transactional_write_stream_security.committing_transaction_to_stream_with_authorized_user_credentials_succeeds" /><Add Test="EventStore.Core.Tests.Services.Storage.CheckCommitStartingAt.when_writing_prepares_in_wrong_order_and_committing_in_right_order.check_commmit_on_expected_prepare_should_return_ok_decision" /><Add Test="EventStore.BufferManagement.Tests.when_disposing_a_buffer_pool.buffers_are_released_back_to_the_buffer_pool" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.StreamBufferTests.adding_multiple_same_read_message" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_disabling_an_enabled_user_account.disables_user_account" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_creating_stream_event_reader.empty_stream_name_throws_argument_exception" /><Add Test="EventStore.Core.Tests.Services.Storage.CheckCommitStartingAt.when_writing_few_prepares_and_committing_one.check_commmit_on_3rd_prepare_should_return_wrong_expected_version" /><Add Test="EventStore.Core.Tests.TransactionLog.Validation.when_validating_tfchunk_db_with_multi_chunks.allows_with_exactly_enough_file_to_reach_checksum_while_last_is_multi_chunk" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.when_creating_a_projection.a_null_run_as_does_not_throw_exception" /><Add Test="EventStore.Projections.Core.Tests.Other.can_serialize_and_deserialize.by_stream_based_checkpoint_tag_zero" /><Add Test="EventStore.Core.Tests.ClientAPI.ssl_append_to_stream.can_append_multiple_events_at_once" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_into_the_middle_of_completed_chunk.all_chunks_are_preserved" /><Add Test="EventStore.Projections.Core.Tests.Integration.system_projections.when_running_system_projections.events_are_categorized" /><Add Test="EventStore.Projections.Core.Tests.Other.can_serialize_and_deserialize.extra_metadata_are_preserved" /><Add Test="EventStore.BufferManagement.Tests.when_setting_the_length_of_the_pool.a_negative_length_throws_an_argumentexception" /><Add Test="EventStore.Core.Tests.Http.Users.users.when_disabling_an_enabled_user_account.enables_it" /><Add Test="EventStore.Core.Tests.TransactionLog.Validation.when_validating_tfchunk_db_with_multi_chunks.allows_last_chunk_to_be_multichunk_when_checkpoint_point_at_the_start_of_next_chunk" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.include_everything_event_filter.does_not_pass_categorized_event" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.read_event_stream_backward_should.be_able_to_read_single_event_from_arbitrary_position" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.multistream_position_tagger.multistream_position_tagger.empty_streams_throws_argument_exception" /><Add Test="EventStore.Core.Tests.ClientAPI.SystemData.clientapi_tcp_package.authorized_with_empty_data_should_serialize_and_deserialize_correctly" /><Add Test="EventStore.Core.Tests.ClientAPI.read_event_stream_backward_should.be_able_to_read_single_event_from_arbitrary_position" /><Add Test="EventStore.Projections.Core.Tests.Services.handlers.categorize_events_by_stream_path+when_handling_link_to_event.emits_correct_link" /><Add Test="EventStore.Projections.Core.Tests.Services.result_emitter.result_emitter+when_result_removed.emits_result_event" /><Add Test="EventStore.Core.Tests.TransactionLog.when_sequentially_reading_db_with_few_chunks.all_records_were_written" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_a_default_checkpoint_manager_has_been_reinitialized.can_begin_load_state" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_a_core_projection_checkpoint_manager_has_been_created.can_begin_load_state" /><Add Test="EventStore.BufferManagement.Tests.when_writing_multiple_bytes.a_count_larger_than_the_buffer_throws_an_argumentoutofrangeexception" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.enable_disable_user.enable_empty_username_throws" /><Add Test="EventStore.Core.Tests.ClientAPI.when_committing_empty_transaction.following_append_with_correct_expected_version_are_commited_correctly" /><Add Test="EventStore.BufferManagement.Tests.when_reading_multiple_bytes.a_negative_count_throws_an_argumentoutofrangeexception" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.change_password.can_change_password" /><Add Test="EventStore.Core.Tests.ClientAPI.connection_string.can_set_int" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.specific_event_event_filter.can_be_built" /><Add Test="EventStore.Core.Tests.Http.StreamSecurity.stream_access.when_creating_a_secured_stream_by_posting_metadata.accepts_post_event_as_authorized_user_by_trusted_auth" /><Add Test="EventStore.Core.Tests.Index.IndexV1.adding_four_items_to_empty_index_map_with_two_tables_per_level_causes_double_merge.a_merged_file_was_created" /><Add Test="EventStore.Core.Tests.Services.Storage.Transactions.when_having_two_intermingled_transactions_and_some_uncommited_prepares_in_the_end_read_index_should.all_records_can_be_read_sequentially_page_by_page_in_forward_pass" /><Add Test="EventStore.BufferManagement.Tests.when_writing_multiple_bytes.an_offset_larger_than_the_buffer_throws_an_argumentoutofrangeexception" /><Add Test="EventStore.Core.Tests.Services.Transport.Http.Authentication.basic_http_authentication_provider.when_handling_multiple_requests_with_the_same_correct_user_name_and_password.does_not_publish_any_read_requests" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_normal_all_stream_with_admin_user_is_allowed" /><Add Test="EventStore.Projections.Core.Tests.Services.staged_processing_queue+when_enqueuing_two_async_async_sync_step_tasks_and_the_second_completes_first.first_task_completed_unblocks_both_tasks" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.multi_stream_reader.when_handling_read_completed.does_not_publish_committed_event_received_messages" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state_cache.when_unlocking_part_of_cached_states.cached_partition_states_cannot_be_locked_before_the_unlock_position" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.authorized_default_credentials_security.all_operations_are_not_authorized_when_overriden_with_not_authorized_credentials" /><Add Test="EventStore.Core.Tests.Services.TimeService.time_service_should.fire_timeouts_gradually" /><Add Test="EventStore.Core.Tests.ClientAPI.when_having_truncatebefore_set_for_stream.after_setting_more_strict_truncatebefore_read_stream_forward_reads_less_events" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.specific_stream_event_filter.does_not_pass_categorized_event_with_incorrect_stream_id" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_single_uncompleted_chunk_with_index_on_disk.checksums_should_be_equal_to_ack_checksum" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reordering_projection_subscription.when_receiving_multiple_events_not_passing_event_filter.checkpoint_suggested_message_is_published_once_for_interval" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_into_the_middle_of_ongoing_chunk.contents_of_first_chunk_should_be_untouched" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.reset_password.empty_password_throws" /><Add Test="EventStore.BufferManagement.Tests.when_instantiating_a_bufferpool.a_null_buffer_manager_throws_an_argumentnullexception" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.include_everything_handling_deleted_notifications_event_filter.does_not_pass_stream_deleted_event" /><Add Test="EventStore.Core.Tests.ClientAPI.append_to_stream.can_append_multiple_events_at_once" /><Add Test="EventStore.Core.Tests.Services.Replication.TransactionCommit.when_transaction_commit_gets_prepare_timeout_before_prepares.failed_request_message_is_published" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_paused_then_handling_no_stream.cannot_be_paused" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.all_streams_catalog_event_reader.when_reading_catalog.when_starting_from_the_beginning.events_are_correct" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_updating_user_details.does_not_update_enabled" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_system_no_acl_stream_with_existing_user_is_not_allowed" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.when_having_max_count_set_for_stream.after_setting_less_strict_max_count_read_stream_backward_reads_more_events" /><Add Test="EventStore.Core.Tests.Http.PersistentSubscription.when_getting_all_statistics_in_json.body_contains_valid_json" /><Add Test="EventStore.Core.Tests.Helpers.length_prefix_suffix_framer_should.correctly_frame_byte_array" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.managed_projection.when_creating_a_managed_projection.empty_guid_throws_invali_argument_exception" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.read_all_events_forward_with_hard_deleted_stream_should.ensure_deleted_stream" /><Add Test="EventStore.BufferManagement.Tests.when_creating_a_buffer_manager.can_create_a_manager_with_zero_inital_segments" /><Add Test="EventStore.Projections.Core.Tests.Services.emitted_stream.when_handling_an_emit_to_the_nonexisting_stream.does_not_reply_with_write_completed_message" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_handling_read_completed_stream_event_reader.cannot_be_paused" /><Add Test="EventStore.Core.Tests.AwakeService.when_handling_committed_event_after_unsybscribe.does_not_awake_another_stream_subscriber_before_position" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.include_everything_handling_deleted_notifications_event_filter.can_be_built" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state_update_manager.when_state_updated.emit_events_writes_correct_state_data" /><Add Test="EventStore.Core.Tests.Index.HashListMemTableTests.existing_item_is_found" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state_update_manager.when_two_states_were_updated.emit_events_writes_event_with_correct_expected_tag" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.when_having_truncatebefore_set_for_stream.after_setting_less_strict_truncatebefore_read_stream_forward_reads_more_events" /><Add Test="EventStore.Projections.Core.Tests.Services.projection_subscription.when_handling_committed_event_passing_the_filter.event_is_passed_to_downstream_handler" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.enable_disable_user.disable_empty_username_throws" /><Add Test="EventStore.Core.Tests.Http.StreamSecurity.stream_access.when_creating_a_secured_stream_by_posting_metadata.accepts_post_event_as_authorized_user" /><Add Test="EventStore.BufferManagement.Tests.when_writing_multiple_bytes.a_negative_offset_throws_an_argumentoutofrangeexception" /><Add Test="EventStore.Core.Tests.Bus.when_publishing_into_memory_bus.any_message_no_other_messages_should_be_published" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.multi_stream_reader.when_resuming.can_handle_read_events_completed" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.event_by_type_index_position_tagger.event_by_type_index_position_tagger.another_events_checkpoint_tag_is_compatible" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_handling_read_completed_stream_event_reader.can_handle_following_read_events_completed" /><Add Test="EventStore.Core.Tests.AwakeService.when_handling_committed_event_after_unsybscribe.does_not_awake_all_subscriber_before_position" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.when_recreating_a_deleted_projection.a_projection_created_event_should_be_written" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_ordinary_user_attempts_to_update_its_own_details.does_not_update_enabled" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.authorized_default_credentials_security.all_operations_are_not_authenticated_when_overriden_with_not_existing_credentials" /><Add Test="EventStore.Core.Tests.Http.PersistentSubscription.when_getting_subscription_statistics_for_individual.detail_rel_href_is_correct" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.when_posting_a_persistent_projection_and_writes_succeed.a_projection_updated_event_is_written" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.read_event_stream_forward_should.be_able_to_read_single_event_from_arbitrary_position" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_changing_a_password_with_incorrect_current_password.does_not_change_the_password" /><Add Test="EventStore.Projections.Core.Tests.Services.feed_reader.feed_reader.when_handling_committed_events.does_not_publish_feed_page_message" /><Add Test="EventStore.Projections.Core.Tests.Services.mixed_checkpoint_tags.are_not_equal" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.StreamBufferTests.adding_messages_with_lower_in_live" /><Add Test="EventStore.BufferManagement.Tests.when_creating_a_buffer_manager.a_zero_chunks_per_segment_causes_an_argumentexception" /><Add Test="EventStore.Core.Tests.ClientAPI.subscribe_should.allow_multiple_subscriptions_to_same_stream" /><Add Test="EventStore.Core.Tests.Http.Streams.when_getting_description_document.contains_the_self_link" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_suggested+when_the_second_checkpoint_is_suggested.a_projection_checkpoint_event_is_published" /><Add Test="EventStore.Core.Tests.Http.Streams.feed.when_retrieving_feed_head.contains_a_link_rel_self" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.when_having_max_count_set_for_stream.after_setting_more_strict_max_count_read_stream_backward_reads_less_events" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.update_existing_persistent_subscription_with_subscribers.existing_subscriptions_are_dropped" /><Add Test="EventStore.Projections.Core.Tests.ClientAPI.with_standard_projections_running.when_soft_deleting_stream_and_starting_standard_projections.deleted_stream_events_are_indexed_as_deleted" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.transaction_file_position_tagger.transaction_file_position_tagger.can_adjust_tf_position_tag" /><Add Test="EventStore.Core.Tests.TransactionLog.when_writing_a_file_checkpoint_to_a_writethroughfile.a_null_file_throws_argumentnullexception" /><Add Test="EventStore.Projections.Core.Tests.Services.staged_processing_queue+when_enqueuing_three_async_async_sync_step_tasks_and_they_complete_starting_from_second.first_task_completed_at_stage_one_unblock_all" /><Add Test="EventStore.Core.Tests.TransactionLog.when_creating_chunked_transaction_file_writer.a_null_config_throws_argument_null_exception" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.event_by_type_index_position_tagger.event_by_type_index_position_tagger.can_update_by_tf_event_if_with_prior_index_position" /><Add Test="EventStore.Projections.Core.Tests.Services.projection_core_service_command_reader.when_creating.does_not_throw" /><Add Test="EventStore.Core.Tests.TransactionLog.Validation.when_validating_tfchunk_db.does_not_allow_checkpoint_to_point_into_the_middle_of_scavenged_chunk" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state.partition_state+can_be_deserialized_from_serialized_form.complex_object" /><Add Test="EventStore.Projections.Core.Tests.Services.partition_state_update_manager.when_two_states_were_updated.emit_events_writes_both_state_updated_event" /><Add Test="EventStore.BufferManagement.Tests.when_changing_data_in_a_bufferpool_via_indexer.a_write_past_end_will_check_out_a_buffer_from_the_buffer_pool" /><Add Test="EventStore.Core.Tests.Http.Streams.when_getting_description_document.contains_the_stream_link" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.NAKTests.explicit_nak_with_park_correctly_tracks_the_available_client_slots" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.StreamBufferTests.adding_read_message_in_correct_order" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.query.a_running_foreach_stream_projection+when_receiving_eof.does_not_write_to_any_other_streams" /><Add Test="EventStore.Core.Tests.Services.Replication.TransactionCommit.when_transaction_commit_gets_stream_deleted.failed_request_message_is_publised" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reordering_projection_subscription.when_handling_duplicate_events.duplicates_are_not_passed_to_downstream_handler" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_creating_a_default_checkpoint_manager.empty_projection_name_throws_argument_exception" /><Add Test="EventStore.BufferManagement.Tests.when_reading_multiple_bytes.an_offset_larger_than_the_buffer_throws_an_argumentoutofrangeexception" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.when_the_state_handler_does_process_an_event_the_projection_should.emit_a_state_updated_event" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.include_everything_handling_deleted_notifications_event_filter.does_not_pass_categorized_event" /><Add Test="EventStore.Core.Tests.Services.Storage.CheckCommitStartingAt.when_writing_single_prepare.check_commmit_should_return_ok_decision" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.AfterScavenge.when_having_stream_both_maxage_and_maxcount_specified_with_maxage_more_strict.forward_range_read_doesnt_return_expired_records" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.enable_disable_user.disable_null_username_throws" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscriptionConfigTests.bad_json_causes_bad_config_data_exception" /><Add Test="EventStore.Core.Tests.ClientAPI.connection_string.can_set_with_spaces" /><Add Test="EventStore.Core.Tests.Bus.when_publishing_to_queued_handler_pulse_before_starting.and_then_starting_message_should_be_forwarded_to_bus" /><Add Test="EventStore.Core.Tests.Index.IndexEntryTests.bytes_is_made_of_key_and_position" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.projection_checkpoint.when_creating_a_projection_checkpoint.commit_position_less_than_or_equal_to_prepare_position_throws_argument_exception" /><Add Test="EventStore.Core.Tests.TransactionLog.when_reading_logical_bytes_bulk_from_a_chunk.a_read_past_eof_doesnt_return_eof_if_chunk_is_not_yet_completed" /><Add Test="EventStore.Projections.Core.Tests.Services.emitted_stream.when_creating_an_emitted_stream.empty_stream_id_throws_argument_exception" /><Add Test="EventStore.Projections.Core.Tests.Services.result_emitter.result_emitter+when_result_updated.emits_result_event" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.event_by_type_index_position_tagger.event_by_type_index_position_tagger.adjust_compatible_tag_returns_the_same_tag" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_handling_no_stream.cannot_be_paused" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_into_the_middle_of_multichunk.all_excessive_chunks_should_be_deleted" /><Add Test="EventStore.Projections.Core.Tests.Services.write_query_result_phase.creating.when_created.can_be_initialized_from_phase_checkpoint" /><Add Test="EventStore.Projections.Core.Tests.Other.when_matching_uri_with_missing_query_variable.bound_variable_c_is_null" /><Add Test="EventStore.Core.Tests.Index.IndexV1.create_index_map_from_non_existing_file.commit_checkpoint_is_equal_to_minus_one" /><Add Test="EventStore.BufferManagement.Tests.when_converting_to_an_effective_IEnumerable_of_arraysegments.empty_returns_no_results" /><Add Test="EventStore.Core.Tests.Services.ElectionsService.elections_service_should_stuck_with_single_node_response.elect_node_with_biggest_port_ip_for_equal_writerchecksums" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.just_from_all_event_filter.cannot_be_built" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.when_updating_a_persistent_projection_query_text.emit_enabled_options_remains_unchanged" /><Add Test="EventStore.Core.Tests.ClientAPI.when_having_truncatebefore_set_for_stream.after_setting_less_strict_truncatebefore_read_stream_forward_reads_more_events" /><Add Test="EventStore.Core.Tests.ClientAPI.connection_string.can_set_bool_value_with_string" /><Add Test="EventStore.Core.Tests.Http.when_running_the_node_advertising_a_different_ip_as+when_retrieving_feed_head_and_http_advertise_ip_is_set.contains_an_entry_with_rel_link_using_advertised_ip_and_port" /><Add Test="EventStore.Core.Tests.TransactionLog.when_writing_a_file_checksum_to_a_file.a_null_file_throws_argumentnullexception" /><Add Test="EventStore.Core.Tests.Http.Users.users.when_enabling_a_disabled_user_account.disables_it" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.event_by_type_index_position_tagger.event_by_type_index_position_tagger.empty_streams_throws_argument_exception" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.multi_stream_reader.when_creating.empty_event_reader_id_throws_argument_exception" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_a_default_checkpoint_manager_has_been_reinitialized.checkpoint_suggested_throws_invalid_operation_exception" /><Add Test="EventStore.Core.Tests.Services.Transport.Http.feed_element_must.be_treated_as_valid_with_empty_entries_list" /><Add Test="EventStore.Core.Tests.Services.Storage.Transactions.when_having_two_intermingled_transactions_and_some_uncommited_prepares_spanning_few_chunks_read_index_should.all_records_can_be_read_sequentially_page_by_page_in_forward_pass" /><Add Test="EventStore.Core.Tests.TransactionLog.Validation.when_validating_tfchunk_db.allows_next_new_chunk_when_checksum_is_exactly_in_between_two_chunks" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_normal_admin_stream_with_no_user_is_not_allowed" /><Add Test="EventStore.Core.Tests.Services.UserManagementService.user_management_service+when_creating_a_user.creates_an_enabled_user_account_with_correct_details" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.projection_checkpoint.when_handling_stream_awaiting_message.does_not_broadcast_second_write_completed_to_awaiting_streams" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_handling_read_completed_then_pause_then_eof.can_be_resumed" /><Add Test="EventStore.Core.Tests.TransactionLog.Scavenging.when_having_stream_with_both_max_age_and_max_count_with_stricter_max_age_specified.expired_prepares_are_scavenged" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_starting_the_core_projection_checkpoint_manager.accepts_checkpoint_suggested" /><Add Test="EventStore.Core.Tests.Index.IndexV1.when_trying_to_get_latest_entry.correct_entry_is_returned" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.subscribe_should.catch_deleted_events_as_well" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.authorized_default_credentials_security.all_operations_succeeds_when_passing_no_explicit_credentials" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.with_softdelete_truncatebefore.backward_range_read_returns_no_records" /><Add Test="EventStore.Core.Tests.TransactionLog.Scavenging.when_having_stream_with_truncatebefore_specified.expired_prepares_are_scavenged" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_paused_then_handling_no_stream.does_not_publish_schedule" /><Add Test="EventStore.Projections.Core.Tests.Services.emitted_stream.when_handling_an_emit_the_started_in_recovery_stream.does_not_publish_already_published_events" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.heading_event_reader.when_heading_event_reader_has_been_created.can_be_started" /><Add Test="EventStore.Core.Tests.TransactionLog.Scavenging.when_having_nothing_to_scavenge.all_records_are_kept_untouched" /><Add Test="EventStore.Projections.Core.Tests.Services.event_filter.just_all_events_event_filter.cannot_be_built" /><Add Test="EventStore.Core.Tests.copying_metadata.copies_empty_metadata" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.with_truncatebefore_greater_than_int_maxvalue.backward_range_read_returns_records_after_truncate_before" /><Add Test="EventStore.Core.Tests.TransactionLog.when_writing_an_existing_chunked_transaction_file_with_not_enough_space_in_chunk.a_record_is_not_written_at_first_but_written_on_second_try" /><Add Test="EventStore.Core.Tests.Services.Replication.DeleteStream.when_delete_stream_gets_commit_timeout_before_final_commit.failed_request_message_is_publised" /><Add Test="EventStore.Projections.Core.Tests.ClientAPI.with_standard_projections_running.when_hard_deleting_stream.deleted_stream_events_are_indexed_as_deleted" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_multiple_event_processed_received_the_core_projection_checkpoint_manager.checkpoint_suggested_at_the_start_position_throws_invalid_operation_exception" /><Add Test="EventStore.Projections.Core.Tests.Integration.system_projections.when_recategorizing_events.events_are_categorized" /><Add Test="EventStore.Core.Tests.TransactionLog.when_sequentially_reading_db_with_one_chunk.all_records_were_written" /><Add Test="EventStore.Core.Tests.Services.PersistentSubscription.OutstandingMessageCacheTests.can_add_duplicate" /><Add Test="EventStore.Projections.Core.Tests.Services.emitted_stream.when_handling_emits_with_previously_written_events.fails_the_projection_if_events_are_at_different_positions" /><Add Test="EventStore.BufferManagement.Tests.when_writing_multiple_bytes.a_negative_count_throws_an_argumentoutofrangeexception" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.when_having_stream_both_maxage_and_maxcount_specified_with_maxcount_more_strict.forward_range_read_doesnt_return_expired_records" /><Add Test="EventStore.Core.Tests.AwakeService.when_handling_committed_event_with_subscribers.does_not_awake_all_subscriber_after_position" /><Add Test="EventStore.Core.Tests.Authentication.when_handling_multiple_requests_with_reset_password_cache_in_between.authenticates_user" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_into_the_middle_of_ongoing_chunk.epoch_checkpoint_should_be_reset_if_less_than_actual_truncate_checkpoint" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_handling_read_completed_stream_event_reader.cannot_be_resumed" /><Add Test="EventStore.Projections.Core.Tests.Services.emitted_stream.when_handling_an_emit_with_expected_tag_the_started_in_recovery_stream.correct_stream_id_is_set_on_write_events_message" /><Add Test="EventStore.Core.Tests.Index.IndexV3.adding_four_items_to_empty_index_map_with_two_tables_per_level_causes_double_merge.a_merged_file_was_created" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_suggested+when_the_second_checkpoint_is_suggested_and_write_succeeds.a_projection_checkpoint_event_is_published" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.when_creating_a_projection.a_null_time_provider__throws_argument_null_exception" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.when_having_truncatebefore_set_for_stream.after_setting_more_strict_truncatebefore_read_stream_backward_reads_less_events" /><Add Test="EventStore.Projections.Core.Tests.Services.checkpoint_tag.checkpoint_tag_by_tf_position.equal_equals" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_to_the_very_beginning_of_multichunk_db.epoch_checkpoint_should_be_reset_if_less_than_actual_truncate_checkpoint" /><Add Test="EventStore.Core.Tests.TransactionLog.when_creating_chunked_transaction_file_reader.a_null_checkpoint_throws_argument_null_exception" /><Add Test="EventStore.Core.Tests.TransactionLog.Truncation.when_truncating_single_uncompleted_chunk_with_index_in_memory_and_then_reopening_db.checksums_should_be_equal_to_ack_checksum" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.transactional_write_stream_security.committing_transaction_to_stream_with_not_authorized_user_credentials_is_denied" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.when_deleting_a_persistent_projection.a_projection_deleted_event_is_written" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.change_password.empty_new_password_throws" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.subscribe_to_all_should.catch_deleted_events_as_well" /><Add Test="EventStore.Projections.Core.Tests.Integration.system_projections.when_recategorizing_events_while_running.events_are_categorized" /><Add Test="EventStore.Core.Tests.Services.Storage.Transactions.when_having_two_intermingled_transactions_read_index_should.all_records_can_be_read_sequentially_page_by_page_in_backward_pass" /><Add Test="EventStore.Projections.Core.Tests.Services.core_projection.checkpoint_manager.when_beginning_to_load_state_the_core_projection_checkpoint_manager.can_be_started" /><Add Test="EventStore.Core.Tests.TransactionLog.Scavenging.when_having_stream_with_max_age_specified.expired_prepares_are_scavenged" /><Add Test="EventStore.BufferManagement.Tests.when_changing_data_in_a_bufferpool_via_indexer.data_that_has_been_set_can_read" /><Add Test="EventStore.Core.Tests.Helpers.length_prefix_suffix_framer_should.discard_data_when_reset_and_continue_unframing_from_blank_slate" /><Add Test="EventStore.Core.Tests.TransactionLog.Validation.when_validating_tfchunk_db.does_not_allow_not_completed_not_last_chunks" /><Add Test="EventStore.Core.Tests.Services.Storage.MaxAgeMaxCount.with_big_max_count.backward_range_read_returns_all_records" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.when_having_truncatebefore_set_for_stream.after_setting_more_strict_truncatebefore_read_stream_forward_reads_less_events" /><Add Test="EventStore.Core.Tests.ClientAPI.Embedded.read_all_events_forward_should.be_able_to_read_events_slice_at_time" /><Add Test="EventStore.Projections.Core.Tests.Services.parallel_processing_load_balancer.when_creating.can_be_created" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.event_by_type_index_position_tagger.when_updating_postion_event_by_type_index_position_tracker.can_update_to_the_same_index_position_but_tf" /><Add Test="EventStore.Projections.Core.Tests.Services.checkpoint_tag.checkpoint_tag_by_event_type_index_positions.equal_operator" /><Add Test="EventStore.Core.Tests.Services.Storage.when_caching_read_items.cache_removes_oldest_item_when_max_size_reached_metadata" /><Add Test="EventStore.Projections.Core.Tests.Services.emitted_stream.another_projection.when_handling_an_emit_with_expected_tag_the_started_in_recovery_stream.fails_the_projection" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_system_admin_stream_with_existing_user_is_not_allowed" /><Add Test="EventStore.Core.Tests.ClientAPI.when_having_max_count_set_for_stream.after_setting_less_strict_max_count_read_stream_backward_reads_more_events" /><Add Test="EventStore.Core.Tests.ClientAPI.UserManagement.creating_a_user.creating_a_user_with_empty_password_throws" /><Add Test="EventStore.Projections.Core.Tests.Services.position_tagging.stream_position_tagger.stream_position_tagger.can_adjust_multi_stream_position_tag" /><Add Test="EventStore.Core.Tests.Bus.when_publishing_to_queued_handler_sleep_before_starting.and_then_starting_message_should_be_forwarded_to_bus" /><Add Test="EventStore.Core.Tests.Services.TimeService.time_service_should.fire_all_timeouts_after_long_pause" /><Add Test="EventStore.Core.Tests.ClientAPI.Security.delete_stream_security.deleting_normal_user_stream_with_not_authorized_user_is_not_allowed" /><Add Test="EventStore.Core.Tests.ClientAPI.subscribe_to_stream_catching_up_should.filter_events_and_work_if_nothing_was_written_after_subscription" /><Add Test="EventStore.Core.Tests.Http.when_running_the_node_advertising_a_different_ip_as+when_retrieving_feed_head_and_http_advertise_ip_is_set.contains_a_link_rel_first_using_advertised_ip_and_port" /><Add Test="EventStore.Projections.Core.Tests.Services.event_reader.stream_reader.when_handling_read_completed_and_eof.cannot_be_paused" /><Add Test="EventStore.Projections.Core.Tests.Services.projections_manager.when_deleting_a_persistent_projection_and_keep_checkpoint_stream.a_projection_deleted_event_is_written" /><Ad
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File can be safely removed.

Copy link
Contributor

@pgermishuys pgermishuys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rodolfograve, thanks for the PR!

We have to make sure that we aren't breaking the API, at least in this version.

You did provide the backwards support for the SubscribeToStreamAsync call but it would still break for users who are using any of the other API bits that previously used Action<Sub, ResolvedEvent, Task>.

@rodolfograve
Copy link
Contributor Author

rodolfograve commented May 25, 2017

Yes, my mistake. I added the missing methods. As an explanation for other readers, I chose to add the methods as extension methods on the interface (IEventStoreConnectionExtensions) to avoid forcing all implementers of the interface to have to provide the same implementation.

I have used this pattern in the past whenever a function can be defined in terms of other methods in the interface.

IEventStoreConnection.ConnectToPersistentSubscription is a good candidate, as it's implemented as ConnectToPersistentSubscriptionAsync(...).Wait()

@pgermishuys
Copy link
Contributor

pgermishuys commented May 25, 2017

Thanks for making those changes @rodolfograve.
re-reviewing.

@@ -54,7 +54,7 @@ public void can_remove_duplicate()
cache.StartMessage(new OutstandingMessage(id, null, Helper.BuildFakeEvent(id, "type", "name", 1), 0), DateTime.Now);
cache.Remove(id);
Assert.AreEqual(0, cache.Count);
Assert.AreEqual(long.MinValue, cache.GetLowestPosition());
Assert.AreEqual(long.MaxValue, cache.GetLowestPosition());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like an unrelated change. Possibly due to a bad rebase. This looks like the changes from a recent PR that was merged (#1302).

@rodolfograve rodolfograve force-pushed the 1051-async-eventAppeared branch 2 times, most recently from 6b18ab3 to 4cc9971 Compare May 25, 2017 20:48
@@ -10,7 +10,7 @@ internal class EmbeddedEventStorePersistentSubscription : EventStorePersistentSu

internal EmbeddedEventStorePersistentSubscription(
string subscriptionId, string streamId,
Action<EventStorePersistentSubscriptionBase, ResolvedEvent> eventAppeared,
Func<EventStorePersistentSubscriptionBase, ResolvedEvent, Task> eventAppeared,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should consider passing in a cancellation token
Func<EventStorePersistentSubscriptionBase, ResolvedEvent, CancellationToken, Task>

That way if a subscription is disposed (/system shutting down), eventAppeared handlers can participate in co-operative cancellation. Usually that means passing the token to something else that does async I/O and is cancellable.

This is the signature I used https://github.com/SQLStreamStore/SQLStreamStore/blob/master/src/SqlStreamStore/Subscriptions/StreamMessageReceived.cs#L20

Also something that may or may not be useful, my TaskQueue implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is absolutely an improvement I would like to see.

Unfortunately it is not required for our use case and I have no more day time to spend on this. If no one else does it, I'll try to add this in as a separate PR.

pgermishuys added a commit that referenced this pull request Jun 6, 2017
hayley-jean pushed a commit that referenced this pull request Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants