Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ public async Task InitializeDbAsync()
{
GenerateDatabaseName();

_heldConnection ??= new List<SqliteConnection>();
var conn = new SqliteConnection(ConnectionString);
await conn.OpenAsync();

_heldConnection!.Add(conn);
_heldConnection.Add(conn);
}

public async Task DisposeAsync()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ public async Task InitializeDbAsync()
{
GenerateDatabaseName();

_heldConnection ??= new List<SQLiteConnection>();
var conn = new SQLiteConnection(ConnectionString);
await conn.OpenAsync();

_heldConnection!.Add(conn);
_heldConnection.Add(conn);
}

public async Task DisposeAsync()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ private static Configuration.Config Config() => ConfigurationFactory.ParseStrin
plugin = "akka.persistence.snapshot-store.sql"
}
}
akka.test.single-expect-default = 10s
""")
.WithFallback(SqlPersistence.DefaultConfiguration);

Expand Down Expand Up @@ -89,7 +90,8 @@ public async Task InitializeAsync()
public async Task DisposeAsync()
{
await Sys.Terminate();
await _fixture.DisposeAsync();
// Do NOT call _fixture.DisposeAsync() here - xUnit manages the collection fixture lifecycle.
// Disposing the shared fixture destroys in-memory databases for all other test classes in the collection.
}

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Akka.Persistence.Sql.Tests/SqlEndToEndSpecBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class = "Akka.Persistence.Sql.Snapshot.SqlSnapshotStore, Akka.Persistence.Sql"
}
}
}
akka.test.single-expect-default = 10s
""";

private const string GetAll = "getAll";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Akka.Persistence.Sql.Tests.Sqlite
{
[CollectionDefinition(nameof(SqlitePersistenceSpec), DisableParallelization = true)]
[Collection(nameof(SqlitePersistenceSpec))]
public class SqliteEndToEndSpec: SqlEndToEndSpecBase<SqliteContainer>
{
public SqliteEndToEndSpec(ITestOutputHelper output, SqliteContainer fixture) : base(output, fixture) { }
Expand Down