-
Notifications
You must be signed in to change notification settings - Fork 49
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
Implement SQL query transaction isolation level from Akka.NET 1.5.3 #301
Implement SQL query transaction isolation level from Akka.NET 1.5.3 #301
Conversation
using (var conn = new SqlConnection(ConnectionString)) | ||
var oldDatabaseName = _builder.InitialCatalog; | ||
var databaseName = $"akka_persistence_tests_{Guid.NewGuid()}"; | ||
_builder.InitialCatalog = databaseName; |
There was a problem hiding this comment.
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
Context.System.Serialization, | ||
GetTimestampProvider(config.GetString("timestamp-provider"))); | ||
} | ||
|
||
[InternalApi] | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
internal static QueryConfiguration CreateQueryConfiguration(Config config, JournalSettings settings) |
There was a problem hiding this comment.
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
Context.System.Serialization); | ||
} | ||
|
||
[InternalApi] | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
internal static QueryConfiguration CreateQueryConfiguration(Config config, SnapshotStoreSettings settings) |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
Changes
IsolationLevel
in settings