Skip to content

Commit

Permalink
Fix unit test DbUtil problem (akkadotnet#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkatufus authored Apr 25, 2023
1 parent 7550b58 commit 5fdca2e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/Akka.Persistence.SqlServer.Tests/DbUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ IF db_id('{databaseName}') IS NULL

public static void Clean()
{
var oldDatabaseName = _builder.InitialCatalog;
var databaseName = $"akka_persistence_tests_{Guid.NewGuid()}";
_builder.InitialCatalog = databaseName;

Expand All @@ -66,12 +65,6 @@ public static void Clean()
using (var cmd = new SqlCommand())
{
cmd.CommandText = $@"
IF db_id('{oldDatabaseName}') IS NOT NULL
BEGIN
ALTER DATABASE [{oldDatabaseName}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE [{oldDatabaseName}];
END
IF db_id('{databaseName}') IS NULL
BEGIN
CREATE DATABASE [{databaseName}];
Expand Down

0 comments on commit 5fdca2e

Please sign in to comment.