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

Marten ProviderUpdate and Persistence provider test #2031

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

GiuseppePatane
Copy link
Contributor

Description

Updated the Marten package version from 4.3.1 to 6.0.2 in the project file.

  • Changed the access modifier of the Event and Snapshot classes from internal to public in the Proto.Persistence.Marten namespace. With the internal modifier all marten test will fail with the following messagge:
    'Snapshot' is not accessible due to the security level
  • Replaced calls to _store.OpenSession() with _store.IdentitySession() in the MartenProvider class for consistency. OpenSession() is now deprecated.
  • Added new test cases for different providers (InMemory MongoDB,RavenDB,SQL Server,SqLite) in the ExamplePersistentActorTests class:
    • EventsAreSavedToPersistence
    • SnapshotsAreSavedToPersistence
    • EventsCanBeDeleted
    • SnapshotsCanBeDeleted
    • GivenEventsOnly_StateIsRestoredFromEvents
    • GivenASnapshotOnly_StateIsRestoredFromTheSnapshot
    • GivenEventsThenASnapshot_StateShouldBeRestoredFromTheSnapshot
    • GivenASnapshotAndSubsequentEvents_StateShouldBeRestoredFromSnapshotAndSubsequentEvents
    • GivenMultipleSnapshots_StateIsRestoredFromMostRecentSnapshot

Purpose

This pull request is a:

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

- Updated the Marten package version from 4.3.1 to 6.0.2 in the project file.
- Changed the access modifier of the `Event` and `Snapshot` classes from internal to public in the `Proto.Persistence.Marten` namespace.
- Replaced calls to `_store.OpenSession()` with `_store.IdentitySession()` in the `MartenProvider` class for consistency.
- Added new test cases for different providers (InMemory and Marten) in the `ExamplePersistentActorTests` class:
    - EventsAreSavedToPersistence
    - SnapshotsAreSavedToPersistence
    - EventsCanBeDeleted
    - SnapshotsCanBeDeleted
    - GivenEventsOnly_StateIsRestoredFromEvents
    - GivenASnapshotOnly_StateIsRestoredFromTheSnapshot
    - GivenEventsThenASnapshot_StateShouldBeRestoredFromTheSnapshot
    - GivenASnapshotAndSubsequentEvents_StateShouldBeRestoredFromSnapshotAndSubsequentEvents
    - GivenMultipleSnapshots_StateIsRestoredFromMostRecentSnapshot
This commit adds support for the following persistence providers:
- Couchbase
- DynamoDB
- MongoDB
- RavenDB
- SQL Server

It also includes changes to the ExamplePersistentActorTests class to test the functionality of these new providers.
@CLAassistant
Copy link

CLAassistant commented Jul 3, 2023

CLA assistant check
All committers have signed the CLA.

@GiuseppePatane GiuseppePatane changed the title Marten Provider Persistence provider test Marten ProviderUpdate and Persistence provider test Jul 3, 2023
@rogeralsing rogeralsing merged commit f3e874f into asynkron:dev Aug 29, 2023
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.

4 participants