From c29e0e92ed511efef0f68e8cac8fb41e6416a89c Mon Sep 17 00:00:00 2001 From: Sven Geusens Date: Wed, 27 Nov 2024 16:20:18 +0100 Subject: [PATCH] Fix merge issues --- Directory.Packages.props | 2 + .../Umbraco.Cms.Api.Common.csproj | 5 -- .../Umbraco.Cms.Persistence.EFCore.csproj | 3 - .../Umbraco.Cms.Persistence.SqlServer.csproj | 8 +- .../PublishedCache/ContentCacheTests.cs | 77 ------------------- 5 files changed, 5 insertions(+), 90 deletions(-) delete mode 100644 tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PublishedCache/ContentCacheTests.cs diff --git a/Directory.Packages.props b/Directory.Packages.props index a1ccfa6765..d207cb2f8b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -80,6 +80,7 @@ + @@ -90,6 +91,7 @@ + diff --git a/src/Umbraco.Cms.Api.Common/Umbraco.Cms.Api.Common.csproj b/src/Umbraco.Cms.Api.Common/Umbraco.Cms.Api.Common.csproj index 7d6b297611..5eb419c28e 100644 --- a/src/Umbraco.Cms.Api.Common/Umbraco.Cms.Api.Common.csproj +++ b/src/Umbraco.Cms.Api.Common/Umbraco.Cms.Api.Common.csproj @@ -17,11 +17,6 @@ - - - - - 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 c5f2e66ac0..08d2dc5448 100644 --- a/src/Umbraco.Cms.Persistence.EFCore/Umbraco.Cms.Persistence.EFCore.csproj +++ b/src/Umbraco.Cms.Persistence.EFCore/Umbraco.Cms.Persistence.EFCore.csproj @@ -15,9 +15,6 @@ - - - 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 e142b81382..aeaedc4098 100644 --- a/src/Umbraco.Cms.Persistence.SqlServer/Umbraco.Cms.Persistence.SqlServer.csproj +++ b/src/Umbraco.Cms.Persistence.SqlServer/Umbraco.Cms.Persistence.SqlServer.csproj @@ -3,7 +3,7 @@ Umbraco CMS - Persistence - SQL Server Adds support for SQL Server to Umbraco CMS. - + $(WarningsNotAsErrors),SA1405,SA1121,SA1117,IDE1006,CS0618,IDE0270,IDE0057,IDE0054,CSO618,IDE0048,CS1574 - + - + - - diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PublishedCache/ContentCacheTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PublishedCache/ContentCacheTests.cs deleted file mode 100644 index 6507bd6cda..0000000000 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PublishedCache/ContentCacheTests.cs +++ /dev/null @@ -1,77 +0,0 @@ -using Microsoft.Extensions.Logging; -using NUnit.Framework; -using Umbraco.Cms.Core.Configuration.Models; -using Umbraco.Cms.Core.Hosting; -using Umbraco.Cms.Core.Models.PublishedContent; -using Umbraco.Cms.Core.PublishedCache; -using Umbraco.Cms.Infrastructure.PublishedCache; -using Umbraco.Cms.Infrastructure.PublishedCache.DataSource; -using Umbraco.Cms.Tests.Common.Builders; -using Umbraco.Cms.Tests.Common.Builders.Extensions; -using Umbraco.Cms.Tests.Common.Testing; -using Umbraco.Cms.Tests.Integration.Testing; - -namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.PublishedCache; - -[TestFixture] -[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] -public class ContentCacheTests : UmbracoIntegrationTestWithContent -{ - private ContentStore GetContentStore() - { - var path = Path.Combine(GetRequiredService().LocalTempPath, "NuCache"); - Directory.CreateDirectory(path); - - var localContentDbPath = Path.Combine(path, "NuCache.Content.db"); - var localContentDbExists = File.Exists(localContentDbPath); - var contentDataSerializer = new ContentDataSerializer(new DictionaryOfPropertyDataSerializer()); - var localContentDb = BTree.GetTree(localContentDbPath, localContentDbExists, new NuCacheSettings(), contentDataSerializer); - - return new ContentStore( - GetRequiredService(), - GetRequiredService(), - LoggerFactory.CreateLogger(), - LoggerFactory, - GetRequiredService(), // new NoopPublishedModelFactory - localContentDb); - } - - private ContentNodeKit CreateContentNodeKit() - { - var contentData = new ContentDataBuilder() - .WithName("Content 1") - .WithProperties(new PropertyDataBuilder() - .WithPropertyData("welcomeText", "Welcome") - .WithPropertyData("welcomeText", "Welcome", "en-US") - .WithPropertyData("welcomeText", "Willkommen", "de") - .WithPropertyData("welcomeText", "Welkom", "nl") - .WithPropertyData("welcomeText2", "Welcome") - .WithPropertyData("welcomeText2", "Welcome", "en-US") - .WithPropertyData("noprop", "xxx") - .Build()) - .Build(); - - return ContentNodeKitBuilder.CreateWithContent( - ContentType.Id, - 1, - "-1,1", - draftData: contentData, - publishedData: contentData); - } - - [Test] - public async Task SetLocked() - { - var contentStore = GetContentStore(); - - using (contentStore.GetScopedWriteLock(ScopeProvider)) - { - var contentNodeKit = CreateContentNodeKit(); - - contentStore.SetLocked(contentNodeKit); - - // Try running the same operation again in an async task - await Task.Run(() => contentStore.SetLocked(contentNodeKit)); - } - } -}