From 884a270fac91ea6a61d1bbc665db6acb6cbd17f5 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Mon, 27 Feb 2023 17:23:21 -0600 Subject: [PATCH] modernized tests and upgraded to Akka.NET v1.5.0-beta3 (#287) --- .../Batching/BatchingSqlServerAllEventsSpec.cs | 13 +++++-------- .../BatchingSqlServerCurrentAllEventsSpec.cs | 13 +++++-------- ...hingSqlServerCurrentEventsByPersistenceIdSpec.cs | 13 +++++-------- .../BatchingSqlServerCurrentEventsByTagSpec.cs | 13 +++++-------- .../BatchingSqlServerCurrentPersistenceIdsSpec.cs | 13 +++++-------- .../BatchingSqlServerEventsByPersistenceIdSpec.cs | 13 +++++-------- .../Batching/BatchingSqlServerEventsByTagSpec.cs | 13 +++++-------- .../Batching/BatchingSqlServerJournalPerfSpec.cs | 13 +++++-------- .../Batching/BatchingSqlServerPersistenceIdsSpec.cs | 13 +++++-------- .../Query/SqlServerAllEventsSpec.cs | 13 +++++-------- .../Query/SqlServerCurrentAllEventsSpec.cs | 13 +++++-------- .../SqlServerCurrentEventsByPersistenceIdSpec.cs | 13 +++++-------- .../Query/SqlServerCurrentEventsByTagSpec.cs | 13 +++++-------- .../Query/SqlServerCurrentPersistenceIdsSpec.cs | 13 +++++-------- .../Query/SqlServerEventsByPersistenceIdSpec.cs | 13 +++++-------- .../Query/SqlServerEventsByTagSpec.cs | 13 +++++-------- .../Query/SqlServerPersistenceIdsSpec.cs | 13 +++++-------- .../SqlServerJournalPerfSpec.cs | 13 +++++-------- src/Directory.Build.props | 2 +- 19 files changed, 91 insertions(+), 145 deletions(-) diff --git a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerAllEventsSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerAllEventsSpec.cs index cd95930..a977b1e 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerAllEventsSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerAllEventsSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Batching { [Collection("SqlServerSpec")] - public class BatchingSqlServerAllEventsSpec : AllEventsSpec, IDisposable + public class BatchingSqlServerAllEventsSpec : AllEventsSpec { public BatchingSqlServerAllEventsSpec(ITestOutputHelper output, SqlServerFixture fixture) : base( InitConfig(fixture), @@ -42,15 +43,11 @@ class = ""Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal, Akka.Pers .WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentAllEventsSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentAllEventsSpec.cs index 9e5d586..59385cd 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentAllEventsSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentAllEventsSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Batching { [Collection("SqlServerSpec")] - public class BatchingSqlServerCurrentAllEventsSpec : CurrentAllEventsSpec, IDisposable + public class BatchingSqlServerCurrentAllEventsSpec : CurrentAllEventsSpec { public BatchingSqlServerCurrentAllEventsSpec(ITestOutputHelper output, SqlServerFixture fixture) : base( InitConfig(fixture), @@ -42,15 +43,11 @@ class = ""Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal, Akka.Pers .WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentEventsByPersistenceIdSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentEventsByPersistenceIdSpec.cs index 4c195a5..552a95c 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentEventsByPersistenceIdSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentEventsByPersistenceIdSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Batching { [Collection("SqlServerSpec")] - public class BatchingSqlServerCurrentEventsByPersistenceIdSpec : CurrentEventsByPersistenceIdSpec, IDisposable + public class BatchingSqlServerCurrentEventsByPersistenceIdSpec : CurrentEventsByPersistenceIdSpec { public BatchingSqlServerCurrentEventsByPersistenceIdSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), nameof(BatchingSqlServerCurrentEventsByPersistenceIdSpec), output) @@ -44,15 +45,11 @@ class = ""Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal, Akka.Pers return conf.WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentEventsByTagSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentEventsByTagSpec.cs index 1ce7704..564815b 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentEventsByTagSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentEventsByTagSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Batching { [Collection("SqlServerSpec")] - public class BatchingSqlServerCurrentEventsByTagSpec : EventsByTagSpec, IDisposable + public class BatchingSqlServerCurrentEventsByTagSpec : EventsByTagSpec { public BatchingSqlServerCurrentEventsByTagSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), nameof(BatchingSqlServerCurrentEventsByTagSpec), output) @@ -50,15 +51,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. return conf.WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentPersistenceIdsSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentPersistenceIdsSpec.cs index 772bf4e..6c4b866 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentPersistenceIdsSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerCurrentPersistenceIdsSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Batching { [Collection("SqlServerSpec")] - public class BatchingSqlServerCurrentPersistenceIdsSpec : CurrentPersistenceIdsSpec, IDisposable + public class BatchingSqlServerCurrentPersistenceIdsSpec : CurrentPersistenceIdsSpec { public BatchingSqlServerCurrentPersistenceIdsSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), nameof(BatchingSqlServerCurrentPersistenceIdsSpec), output) @@ -44,15 +45,11 @@ class = ""Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal, Akka.Pers return conf.WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerEventsByPersistenceIdSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerEventsByPersistenceIdSpec.cs index 3386226..4e0a76d 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerEventsByPersistenceIdSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerEventsByPersistenceIdSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Batching { [Collection("SqlServerSpec")] - public class BatchingSqlServerEventsByPersistenceIdSpec : EventsByPersistenceIdSpec, IDisposable + public class BatchingSqlServerEventsByPersistenceIdSpec : EventsByPersistenceIdSpec { public BatchingSqlServerEventsByPersistenceIdSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), nameof(BatchingSqlServerEventsByPersistenceIdSpec), output) @@ -44,15 +45,11 @@ class = ""Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal, Akka.Pers return conf.WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerEventsByTagSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerEventsByTagSpec.cs index 921de1d..a3e09ed 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerEventsByTagSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerEventsByTagSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Batching { [Collection("SqlServerSpec")] - public class BatchingSqlServerEventsByTagSpec : EventsByTagSpec, IDisposable + public class BatchingSqlServerEventsByTagSpec : EventsByTagSpec { public BatchingSqlServerEventsByTagSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), nameof(BatchingSqlServerEventsByTagSpec), output) @@ -50,15 +51,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. return conf.WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerJournalPerfSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerJournalPerfSpec.cs index 170a3f9..32ddd71 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerJournalPerfSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerJournalPerfSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.TestKit.Performance; using Xunit; @@ -13,7 +14,7 @@ namespace Akka.Persistence.SqlServer.Tests { [Collection("SqlServerSpec")] - public class BatchingSqlServerJournalPerfSpec : JournalPerfSpec, IDisposable + public class BatchingSqlServerJournalPerfSpec : JournalPerfSpec { public BatchingSqlServerJournalPerfSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), "BatchingSqlServerJournalPerfSpec", output) @@ -47,15 +48,11 @@ class = ""Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal, Akka.Pers return ConfigurationFactory.ParseString(specString); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerPersistenceIdsSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerPersistenceIdsSpec.cs index 2a384ad..f959ab5 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerPersistenceIdsSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Batching/BatchingSqlServerPersistenceIdsSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Batching { [Collection("SqlServerSpec")] - public class BatchingSqlServerPersistenceIdsSpec : PersistenceIdsSpec, IDisposable + public class BatchingSqlServerPersistenceIdsSpec : PersistenceIdsSpec { public BatchingSqlServerPersistenceIdsSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), nameof(BatchingSqlServerPersistenceIdsSpec), output) @@ -44,15 +45,11 @@ class = ""Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal, Akka.Pers return conf.WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerAllEventsSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerAllEventsSpec.cs index 9a0dd86..23b86fb 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerAllEventsSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerAllEventsSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Query { [Collection("SqlServerSpec")] - public class SqlServerAllEventsSpec : AllEventsSpec, IDisposable + public class SqlServerAllEventsSpec : AllEventsSpec { public SqlServerAllEventsSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), nameof(SqlServerAllEventsSpec), output) @@ -48,15 +49,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. .WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentAllEventsSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentAllEventsSpec.cs index ab2bd37..ba4f6e2 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentAllEventsSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentAllEventsSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Query { [Collection("SqlServerSpec")] - public class SqlServerCurrentAllEventsSpec : CurrentAllEventsSpec, IDisposable + public class SqlServerCurrentAllEventsSpec : CurrentAllEventsSpec { public SqlServerCurrentAllEventsSpec(ITestOutputHelper output, SqlServerFixture fixture) : base( InitConfig(fixture), @@ -49,15 +50,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. .WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentEventsByPersistenceIdSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentEventsByPersistenceIdSpec.cs index f18f485..4135189 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentEventsByPersistenceIdSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentEventsByPersistenceIdSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Query { [Collection("SqlServerSpec")] - public class SqlServerCurrentEventsByPersistenceIdSpec : CurrentEventsByPersistenceIdSpec, IDisposable + public class SqlServerCurrentEventsByPersistenceIdSpec : CurrentEventsByPersistenceIdSpec { public SqlServerCurrentEventsByPersistenceIdSpec(ITestOutputHelper output, SqlServerFixture fixture) : base( InitConfig(fixture), nameof(SqlServerCurrentEventsByPersistenceIdSpec), output) @@ -42,15 +43,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. .WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentEventsByTagSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentEventsByTagSpec.cs index 7278306..e3d91ba 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentEventsByTagSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentEventsByTagSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Query { [Collection("SqlServerSpec")] - public class SqlServerCurrentEventsByTagSpec : CurrentEventsByTagSpec, IDisposable + public class SqlServerCurrentEventsByTagSpec : CurrentEventsByTagSpec { public SqlServerCurrentEventsByTagSpec(ITestOutputHelper output, SqlServerFixture fixture) : base( InitConfig(fixture), @@ -49,15 +50,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. .WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentPersistenceIdsSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentPersistenceIdsSpec.cs index 038662a..3089c53 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentPersistenceIdsSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerCurrentPersistenceIdsSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Query { [Collection("SqlServerSpec")] - public class SqlServerCurrentPersistenceIdsSpec : CurrentPersistenceIdsSpec, IDisposable + public class SqlServerCurrentPersistenceIdsSpec : CurrentPersistenceIdsSpec { public SqlServerCurrentPersistenceIdsSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), nameof(SqlServerCurrentPersistenceIdsSpec), output) @@ -42,15 +43,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. .WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerEventsByPersistenceIdSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerEventsByPersistenceIdSpec.cs index dc332e8..5bcce03 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerEventsByPersistenceIdSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerEventsByPersistenceIdSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Query { [Collection("SqlServerSpec")] - public class SqlServerEventsByPersistenceIdSpec : EventsByPersistenceIdSpec, IDisposable + public class SqlServerEventsByPersistenceIdSpec : EventsByPersistenceIdSpec { public SqlServerEventsByPersistenceIdSpec(ITestOutputHelper output, SqlServerFixture fixture) : base( InitConfig(fixture), nameof(SqlServerEventsByPersistenceIdSpec), output) @@ -42,15 +43,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. .WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerEventsByTagSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerEventsByTagSpec.cs index 653186f..823b72f 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerEventsByTagSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerEventsByTagSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Query { [Collection("SqlServerSpec")] - public class SqlServerEventsByTagSpec : EventsByTagSpec, IDisposable + public class SqlServerEventsByTagSpec : EventsByTagSpec { public SqlServerEventsByTagSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), nameof(SqlServerEventsByTagSpec), output) @@ -48,15 +49,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. .WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerPersistenceIdsSpec.cs b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerPersistenceIdsSpec.cs index db7a136..e218e7c 100644 --- a/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerPersistenceIdsSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/Query/SqlServerPersistenceIdsSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.Query; using Akka.Persistence.Query.Sql; @@ -15,7 +16,7 @@ namespace Akka.Persistence.SqlServer.Tests.Query { [Collection("SqlServerSpec")] - public class SqlServerPersistenceIdsSpec : PersistenceIdsSpec, IDisposable + public class SqlServerPersistenceIdsSpec : PersistenceIdsSpec { public SqlServerPersistenceIdsSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), nameof(SqlServerPersistenceIdsSpec), output) @@ -42,15 +43,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. .WithFallback(SqlReadJournal.DefaultConfiguration()); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Akka.Persistence.SqlServer.Tests/SqlServerJournalPerfSpec.cs b/src/Akka.Persistence.SqlServer.Tests/SqlServerJournalPerfSpec.cs index d4f8f47..35cce4c 100644 --- a/src/Akka.Persistence.SqlServer.Tests/SqlServerJournalPerfSpec.cs +++ b/src/Akka.Persistence.SqlServer.Tests/SqlServerJournalPerfSpec.cs @@ -5,6 +5,7 @@ // ----------------------------------------------------------------------- using System; +using System.Threading.Tasks; using Akka.Configuration; using Akka.Persistence.TestKit.Performance; using Xunit; @@ -13,7 +14,7 @@ namespace Akka.Persistence.SqlServer.Tests { [Collection("SqlServerSpec")] - public class SqlServerJournalPerfSpec : JournalPerfSpec, IDisposable + public class SqlServerJournalPerfSpec : JournalPerfSpec { public SqlServerJournalPerfSpec(ITestOutputHelper output, SqlServerFixture fixture) : base(InitConfig(fixture), "SqlServerJournalPerfSpec", output) @@ -47,15 +48,11 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence. return ConfigurationFactory.ParseString(specString); } - protected void Dispose(bool disposing) - { - DbUtils.Clean(); - } - - public void Dispose() + public override Task DisposeAsync() { GC.SuppressFinalize(this); - Dispose(true); + DbUtils.Clean(); + return base.DisposeAsync(); } } } \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 901d30d..ae65323 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -11,7 +11,7 @@ 2.4.2 - 1.5.0-beta2 + 1.5.0-beta3 17.4.1 net6.0 net48