Skip to content
This repository was archived by the owner on Mar 20, 2025. It is now read-only.

Conversation

Arkatufus
Copy link
Contributor

Changes

  • Implement SQL transaction IsolationLevel in settings
  • Add unit tests

using (var conn = new SqlConnection(ConnectionString))
var oldDatabaseName = _builder.InitialCatalog;
var databaseName = $"akka_persistence_tests_{Guid.NewGuid()}";
_builder.InitialCatalog = databaseName;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Create a new database for each unit tests to prevent cross-polination between unit tests


[InternalApi]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static QueryConfiguration CreateQueryConfiguration(Config config, JournalSettings settings)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Move out QueryConfiguration creation so that is testable


[InternalApi]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static QueryConfiguration CreateQueryConfiguration(Config config, SnapshotStoreSettings settings)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Move out QueryConfiguration creation so that it is testable

defaultSerializer: config.GetString("serializer"),
useSequentialAccess: config.GetBoolean("sequential-access"),
readIsolationLevel: settings.ReadIsolationLevel,
writeIsolationLevel: settings.WriteIsolationLevel);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pass in new isolation level arguments

defaultSerializer: config.GetString("serializer"),
useSequentialAccess: config.GetBoolean("sequential-access"),
readIsolationLevel: settings.ReadIsolationLevel,
writeIsolationLevel: settings.WriteIsolationLevel);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pass in new isolation level arguments

@Aaronontheweb Aaronontheweb merged commit f1754fb into akkadotnet:dev Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants