Paweł Pacana

Results 117 comments of Paweł Pacana

Logging (and in production monitoring/metrics) can be solved by adding instrumentation (see https://github.com/arkency/rails_event_store/pull/73). Then logging would be a matter of: ``` class LogRailsEventStore def call(name, started, finished, unique_id, payload) Rails.logger.debug(['RailsEventStore:',...

I must say that's intriguing — I didn't find a drawback in this solution last time I was briefly thinking about it. But I think such a change would require...

@paneq Any shower thoughts? 🙃

Once I did following _stunt_: - there were domain events describing some fact in the system that carried geolocation in data - I had a separate context that was interested...

Ideally I'd like to have some form or snapshot / golden master test for schema: - each supported RDBMS has its sql-to-compare file - each migration expressed with Rails schema...

For the record, migrating with version set to at least`5.0` gives: ``` PG::DuplicateTable: ERROR: relation "index_event_store_events_on_event_id" already exists ```

> instrumented by: # Would it be clearer to show actual instrumenter here like `AS::Notifications`, not the wrapper around it?

`arrange`, `act`, `assert_changes` that reads persisted events from given stream: https://github.com/RailsEventStore/cqrs-es-sample-with-res/blob/a32e18a79b0aaa8e21a9b361aac62df4876b8f49/test/support/test_case.rb#L2-L20 and a quite similar take in https://github.com/arkency/aggregates/blob/af64b361d2c1624e6e9bff86fb8a470d9d0d5c82/test/test_helper.rb#L17-L32

before-after-reject can probably be implemented with https://railseventstore.org/docs/subscribe/#temporary-subscriptions (and subscribe_to_all_events), also being a thread safe version by default

Using a bit older API: ```ruby def assert_exact_new_events(event_store, new_events) events_so_far = event_store.read_all_streams_forward yield assert_equal( new_events, (event_store.read_all_streams_forward - events_so_far).map(&:class) ) end def assert_new_events_include(event_store, expected_events) events_so_far = event_store.read_all_streams_forward yield new_events = (event_store.read_all_streams_forward...