diff --git a/Directory.Packages.props b/Directory.Packages.props index 656325376c56..d0ced18737f3 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -12,28 +12,28 @@ - - + + - - - - + + + + - - + + - - - - + + + + - + @@ -45,13 +45,13 @@ - - - + + + - + - + @@ -62,37 +62,40 @@ - + - + - + - - + + - + - + - + + + + - + \ No newline at end of file diff --git a/src/Umbraco.Cms.Persistence.EFCore.SqlServer/Umbraco.Cms.Persistence.EFCore.SqlServer.csproj b/src/Umbraco.Cms.Persistence.EFCore.SqlServer/Umbraco.Cms.Persistence.EFCore.SqlServer.csproj index d663ef0197d4..456c189614d8 100644 --- a/src/Umbraco.Cms.Persistence.EFCore.SqlServer/Umbraco.Cms.Persistence.EFCore.SqlServer.csproj +++ b/src/Umbraco.Cms.Persistence.EFCore.SqlServer/Umbraco.Cms.Persistence.EFCore.SqlServer.csproj @@ -7,6 +7,11 @@ + + + + + diff --git a/src/Umbraco.Cms.Persistence.EFCore/Locking/SqlServerEFCoreDistributedLockingMechanism.cs b/src/Umbraco.Cms.Persistence.EFCore/Locking/SqlServerEFCoreDistributedLockingMechanism.cs index f037335837b8..91342c386f94 100644 --- a/src/Umbraco.Cms.Persistence.EFCore/Locking/SqlServerEFCoreDistributedLockingMechanism.cs +++ b/src/Umbraco.Cms.Persistence.EFCore/Locking/SqlServerEFCoreDistributedLockingMechanism.cs @@ -170,7 +170,9 @@ private void ObtainWriteLock() "A transaction with minimum ReadCommitted isolation level is required."); } +#pragma warning disable EF1002 var rowsAffected = await dbContext.Database.ExecuteSqlRawAsync(@$"SET LOCK_TIMEOUT {(int)_timeout.TotalMilliseconds};UPDATE umbracoLock WITH (REPEATABLEREAD) SET value = (CASE WHEN (value=1) THEN -1 ELSE 1 END) WHERE id={LockId}"); +#pragma warning restore EF1002 if (rowsAffected == 0) { diff --git a/src/Umbraco.Cms.Persistence.EFCore/Umbraco.Cms.Persistence.EFCore.csproj b/src/Umbraco.Cms.Persistence.EFCore/Umbraco.Cms.Persistence.EFCore.csproj index ed8a10f42ff6..d097dbb1b5df 100644 --- a/src/Umbraco.Cms.Persistence.EFCore/Umbraco.Cms.Persistence.EFCore.csproj +++ b/src/Umbraco.Cms.Persistence.EFCore/Umbraco.Cms.Persistence.EFCore.csproj @@ -10,6 +10,10 @@ + + + + diff --git a/src/Umbraco.Cms.Persistence.SqlServer/Umbraco.Cms.Persistence.SqlServer.csproj b/src/Umbraco.Cms.Persistence.SqlServer/Umbraco.Cms.Persistence.SqlServer.csproj index 9aef183cf65e..3addde6bc407 100644 --- a/src/Umbraco.Cms.Persistence.SqlServer/Umbraco.Cms.Persistence.SqlServer.csproj +++ b/src/Umbraco.Cms.Persistence.SqlServer/Umbraco.Cms.Persistence.SqlServer.csproj @@ -7,6 +7,11 @@ + + + + + diff --git a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj index c5a60e8dccc1..5d7242592f04 100644 --- a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj +++ b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj @@ -37,6 +37,12 @@ + + + + + + diff --git a/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj b/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj index 26fa5cf63604..bb9c3471f2cc 100644 --- a/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj +++ b/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj @@ -26,6 +26,8 @@ + + diff --git a/tests/Directory.Packages.props b/tests/Directory.Packages.props index 9e14b435eaf3..d144d5b86b5a 100644 --- a/tests/Directory.Packages.props +++ b/tests/Directory.Packages.props @@ -5,19 +5,19 @@ - + - - + + - + diff --git a/tests/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs b/tests/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs index a174476acd3e..d9bdb0097611 100644 --- a/tests/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs +++ b/tests/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs @@ -81,7 +81,11 @@ public void Setup() } [TearDown] - public void TearDownAsync() => _host.StopAsync(); + public void TearDownAsync() + { + _host.StopAsync(); + Services.DisposeIfDisposable(); + } /// /// Create the Generic Host and execute startup ConfigureServices/Configure calls