From c8e054baa2714e34d9182d16ae9925367330657c Mon Sep 17 00:00:00 2001 From: Sven Geusens Date: Tue, 12 Sep 2023 14:16:27 +0200 Subject: [PATCH 1/8] V10/feature/pipeline test filters (#14766) * Add configuration/code to not run certain tests based on variables/release builds * Applied longrunning testAttribute to the worst offenders (>200ms on my machine) * Fix yaml notation * split up windows/non windows test runs * Added supression for moved tests * Fix yaml validation issues * Change yaml string parameter null value to empty string * Convert empty strings to whitespace strings * Rename and cleanup some paramater to better reflect why we use them * Nightly build test * Change nightly build authentication type * template paramater fix * Update nightly pipeline name --------- Co-authored-by: Sven Geusens --- build/azure-pipelines.yml | 65 +++++++++++++++++-- build/nightly-build-trigger.yml | 32 +++++++++ .../Attributes/LongRunning.cs | 12 ++++ .../Attributes/NonCritical.cs | 12 ++++ tests/Umbraco.Tests.Common/TestConstants.cs | 13 ++++ .../CompatibilitySuppressions.xml | 18 +++++ .../ComponentRuntimeTests.cs | 2 + .../NewBackoffice/OpenAPIContractTest.cs | 2 + ...reNotAmbiguousActionNameControllerTests.cs | 2 + .../Events/EventAggregatorTests.cs | 2 + .../Umbraco.Core/IO/FileSystemsTests.cs | 2 + .../Umbraco.Core/IO/ShadowFileSystemTests.cs | 2 + .../Mapping/ContentTypeModelMappingTests.cs | 2 + .../CreatedPackagesRepositoryTests.cs | 2 + .../PublishedContentQueryAccessorTests.cs | 2 + .../Services/ContentServiceTests.cs | 30 +++++++-- .../ContentVariantAllowedActionTests.cs | 2 + .../UmbracoExamine/IndexTest.cs | 10 +++ .../PublishedContentQueryTests.cs | 2 + .../UmbracoExamine/SearchTests.cs | 2 + .../Packaging/PackageDataInstallationTests.cs | 11 ++++ .../Persistence/LocksTests.cs | 3 + .../Repositories/ContentTypeRepositoryTest.cs | 2 + .../Repositories/DocumentRepositoryTest.cs | 2 + .../Repositories/EntityRepositoryTest.cs | 2 + .../Repositories/MediaRepositoryTest.cs | 30 --------- .../PublicAccessRepositoryTest.cs | 2 + .../Runtime/FileSystemMainDomLockTests.cs | 3 + .../Scoping/ScopeTests.cs | 3 + .../Scoping/ScopedNuCacheTests.cs | 2 + .../Services/ContentEventsTests.cs | 52 +++++++++++++++ .../ContentServiceNotificationTests.cs | 2 + .../Services/ContentServicePerformanceTest.cs | 8 +++ .../ContentServicePublishBranchTests.cs | 2 + .../Services/ContentTypeServiceTests.cs | 4 ++ .../ContentTypeServiceVariantsTests.cs | 2 + .../Services/EntityServiceTests.cs | 9 +++ .../Services/MediaTypeServiceTests.cs | 2 + .../Services/RedirectUrlServiceTests.cs | 4 ++ .../Services/ThreadSafetyServiceTest.cs | 3 + .../Services/TrackRelationsTests.cs | 2 + .../Umbraco.Tests.Integration.csproj | 5 +- .../BackOfficeAssetsControllerTests.cs | 2 + .../Controllers/ContentControllerTests.cs | 12 ++++ .../Controllers/DataTypeControllerTests.cs | 2 + .../Controllers/EntityControllerTests.cs | 9 +++ .../TemplateQueryControllerTests.cs | 2 + .../Controllers/UsersControllerTests.cs | 10 +++ .../OutgoingEditorModelEventFilterTests.cs | 3 + .../Routing/FrontEndRouteTests.cs | 2 + .../Security/MemberAuthorizeTests.cs | 5 ++ 51 files changed, 375 insertions(+), 43 deletions(-) create mode 100644 build/nightly-build-trigger.yml create mode 100644 tests/Umbraco.Tests.Common/Attributes/LongRunning.cs create mode 100644 tests/Umbraco.Tests.Common/Attributes/NonCritical.cs create mode 100644 tests/Umbraco.Tests.Common/TestConstants.cs create mode 100644 tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml rename tests/Umbraco.Tests.Integration/{Umbraco.Infrastructure => Umbraco.Core}/Services/ContentServiceTests.cs (99%) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 48f38966f4..ec4874570f 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -21,6 +21,26 @@ parameters: displayName: Upload API docs type: boolean default: false + - name: forceReleaseTestFilter + displayName: Force to use the release test filters + type: boolean + default: false + - name: integrationNonReleaseTestFilter + displayName: TestFilter used for non-release type builds + type: string + default: '--filter TestCategory!=LongRunning&TestCategory!=NonCritical' + - name: integrationReleaseTestFilter + displayName: TestFilter used for release type builds + type: string + default: ' ' + - name: nonWindowsIntegrationNonReleaseTestFilter + displayName: TestFilter used for non-release type builds on non windows agents + type: string + default: '--filter TestCategory!=LongRunning&TestCategory!=NonCritical' + - name: nonWindowsIntegrationReleaseTestFilter + displayName: TestFilter used for release type builds on non windows agents + type: string + default: ' ' variables: nodeVersion: 14.18.1 @@ -286,12 +306,30 @@ stages: performMultiLevelLookup: true includePreviewVersions: $(dotnetIncludePreviewVersions) - task: DotNetCoreCLI@2 - displayName: Run dotnet test + displayName: Run dotnet test Windows + condition: eq(variables['Agent.OS'],'Windows_NT') inputs: command: test projects: '**/*.Tests.Integration.csproj' - arguments: '--configuration $(buildConfiguration) --no-build' testRunTitle: Integration Tests SQLite - $(Agent.OS) + ${{ if or( parameters.forceReleaseTestFilter, startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) }}: + arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}' + ${{ else }}: + arguments: '--configuration $(buildConfiguration) ${{parameters.integrationNonReleaseTestFilter}}' + env: + Tests__Database__DatabaseType: 'Sqlite' + Umbraco__CMS__Global__MainDomLock: 'FileSystemMainDomLock' + - task: DotNetCoreCLI@2 + displayName: Run dotnet test Non Windows + condition: ne(variables['Agent.OS'],'Windows_NT') + inputs: + command: test + projects: '**/*.Tests.Integration.csproj' + testRunTitle: Integration Tests SQLite - $(Agent.OS) + ${{ if or( parameters.forceReleaseTestFilter, startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) }}: + arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}' + ${{ else }}: + arguments: '--configuration $(buildConfiguration) ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}' env: Tests__Database__DatabaseType: 'Sqlite' Umbraco__CMS__Global__MainDomLock: 'FileSystemMainDomLock' @@ -328,12 +366,31 @@ stages: displayName: Start SQL Server (Linux only) condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - task: DotNetCoreCLI@2 - displayName: Run dotnet test + displayName: Run dotnet test Windows + condition: eq(variables['Agent.OS'],'Windows_NT') inputs: command: test projects: '**/*.Tests.Integration.csproj' - arguments: '--configuration $(buildConfiguration) --no-build' testRunTitle: Integration Tests SQL Server - $(Agent.OS) + ${{ if or( parameters.forceReleaseTestFilter, startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) }}: + arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}' + ${{ else }}: + arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.integrationNonReleaseTestFilter}}' + env: + Tests__Database__DatabaseType: $(testDb) + Tests__Database__SQLServerMasterConnectionString: $(connectionString) + Umbraco__CMS__Global__MainDomLock: 'SqlMainDomLock' + - task: DotNetCoreCLI@2 + displayName: Run dotnet test NonWindows + condition: ne(variables['Agent.OS'],'Windows_NT') + inputs: + command: test + projects: '**/*.Tests.Integration.csproj' + testRunTitle: Integration Tests SQL Server - $(Agent.OS) + ${{ if or( parameters.forceReleaseTestFilter, startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) }}: + arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}' + ${{ else }}: + arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}' env: Tests__Database__DatabaseType: $(testDb) Tests__Database__SQLServerMasterConnectionString: $(connectionString) diff --git a/build/nightly-build-trigger.yml b/build/nightly-build-trigger.yml new file mode 100644 index 0000000000..b14db9abad --- /dev/null +++ b/build/nightly-build-trigger.yml @@ -0,0 +1,32 @@ +name: Nightly_$(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) + +schedules: +- cron: '0 0 * * *' + displayName: Daily midnight build + branches: + include: + - v9/dev + - v10/dev + - v12/dev + - v13/dev + - v14/dev + +steps: +- task: TriggerBuild@4 + inputs: + definitionIsInCurrentTeamProject: true + buildDefinition: '301' + queueBuildForUserThatTriggeredBuild: true + ignoreSslCertificateErrors: false + useSameSourceVersion: false + useCustomSourceVersion: false + useSameBranch: true + waitForQueuedBuildsToFinish: false + storeInEnvironmentVariable: false + templateParameters: 'sqlServerIntegrationTests: true, forceReleaseTestFilter: true' + authenticationMethod: 'OAuth Token' + enableBuildInQueueCondition: false + dependentOnSuccessfulBuildCondition: false + dependentOnFailedBuildCondition: false + checkbuildsoncurrentbranch: false + failTaskIfConditionsAreNotFulfilled: false \ No newline at end of file diff --git a/tests/Umbraco.Tests.Common/Attributes/LongRunning.cs b/tests/Umbraco.Tests.Common/Attributes/LongRunning.cs new file mode 100644 index 0000000000..1eb40f2072 --- /dev/null +++ b/tests/Umbraco.Tests.Common/Attributes/LongRunning.cs @@ -0,0 +1,12 @@ +using NUnit.Framework; + +namespace Umbraco.Cms.Tests.Common.Attributes; + +[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false)] +public class LongRunning : CategoryAttribute +{ + public LongRunning() + : base(TestConstants.Categories.LongRunning) + { + } +} diff --git a/tests/Umbraco.Tests.Common/Attributes/NonCritical.cs b/tests/Umbraco.Tests.Common/Attributes/NonCritical.cs new file mode 100644 index 0000000000..5bf2dc2562 --- /dev/null +++ b/tests/Umbraco.Tests.Common/Attributes/NonCritical.cs @@ -0,0 +1,12 @@ +using NUnit.Framework; + +namespace Umbraco.Cms.Tests.Common.Attributes; + +[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false)] +public class NonCritical : CategoryAttribute +{ + public NonCritical() + : base(TestConstants.Categories.NonCritical) + { + } +} diff --git a/tests/Umbraco.Tests.Common/TestConstants.cs b/tests/Umbraco.Tests.Common/TestConstants.cs new file mode 100644 index 0000000000..221eb17ac6 --- /dev/null +++ b/tests/Umbraco.Tests.Common/TestConstants.cs @@ -0,0 +1,13 @@ +namespace Umbraco.Cms.Tests.Common; + +public static class TestConstants +{ + /// + /// Used for TestCategories, they are designed to be used in an exclusion filter pattern + /// + public static class Categories + { + public const string LongRunning = "LongRunning"; + public const string NonCritical = "NonCritical"; + } +} diff --git a/tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml b/tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml new file mode 100644 index 0000000000..8cf2d295d0 --- /dev/null +++ b/tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml @@ -0,0 +1,18 @@ + + + + + CP0001 + T:Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.ContentServiceTests + lib/net6.0/Umbraco.Tests.Integration.dll + lib/net6.0/Umbraco.Tests.Integration.dll + true + + + CP0002 + M:Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories.MediaRepositoryTest.QueryMedia_ContentTypeAliasFilter + lib/net6.0/Umbraco.Tests.Integration.dll + lib/net6.0/Umbraco.Tests.Integration.dll + true + + \ No newline at end of file diff --git a/tests/Umbraco.Tests.Integration/ComponentRuntimeTests.cs b/tests/Umbraco.Tests.Integration/ComponentRuntimeTests.cs index e1a1ac8ae8..030104b10b 100644 --- a/tests/Umbraco.Tests.Integration/ComponentRuntimeTests.cs +++ b/tests/Umbraco.Tests.Integration/ComponentRuntimeTests.cs @@ -8,6 +8,7 @@ using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Runtime; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -24,6 +25,7 @@ public class ComponentRuntimeTests : UmbracoIntegrationTest /// This will boot up umbraco with components enabled to show they initialize and shutdown /// [Test] + [LongRunning] public async Task Start_And_Stop_Umbraco_With_Components_Enabled() { var runtime = Services.GetRequiredService(); diff --git a/tests/Umbraco.Tests.Integration/NewBackoffice/OpenAPIContractTest.cs b/tests/Umbraco.Tests.Integration/NewBackoffice/OpenAPIContractTest.cs index a937ee905d..cccc132d3f 100644 --- a/tests/Umbraco.Tests.Integration/NewBackoffice/OpenAPIContractTest.cs +++ b/tests/Umbraco.Tests.Integration/NewBackoffice/OpenAPIContractTest.cs @@ -8,6 +8,7 @@ using NUnit.Framework; using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Integration.TestServerTest; using Umbraco.Extensions; @@ -32,6 +33,7 @@ internal sealed class OpenAPIContractTest : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task Validate_OpenApi_Contract_is_implemented() { string[] keysToIgnore = { "servers", "x-generator" }; diff --git a/tests/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs b/tests/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs index 21b1445e36..638a44aa7f 100644 --- a/tests/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs +++ b/tests/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs @@ -5,6 +5,7 @@ using System; using NUnit.Framework; using Umbraco.Cms.Core; using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Web.BackOffice.Controllers; namespace Umbraco.Cms.Tests.Integration.TestServerTest.Controllers; @@ -13,6 +14,7 @@ namespace Umbraco.Cms.Tests.Integration.TestServerTest.Controllers; public class EnsureNotAmbiguousActionNameControllerTests : UmbracoTestServerTestBase { [Test] + [LongRunning] public void EnsureNotAmbiguousActionName() { var intId = 0; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/Events/EventAggregatorTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/Events/EventAggregatorTests.cs index 70951d98c2..207867a18b 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/Events/EventAggregatorTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Events/EventAggregatorTests.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.DependencyInjection; using NUnit.Framework; using Umbraco.Cms.Core.Events; using Umbraco.Cms.Core.Notifications; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Integration.TestServerTest; namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Events; @@ -20,6 +21,7 @@ public class EventAggregatorTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task Publish_HandlerWithScopedDependency_DoesNotThrow() { var result = await Client.GetAsync("/test-handler-with-scoped-services"); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/FileSystemsTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/FileSystemsTests.cs index 8fa8f0e252..2d86f4b6f6 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/FileSystemsTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/FileSystemsTests.cs @@ -8,6 +8,7 @@ using NUnit.Framework; using Umbraco.Cms.Core.Hosting; using Umbraco.Cms.Core.IO; using Umbraco.Cms.Core.IO.MediaPathSchemes; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -33,6 +34,7 @@ public class FileSystemsTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void Can_Delete_MediaFiles() { var mediaFileManager = GetRequiredService(); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/ShadowFileSystemTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/ShadowFileSystemTests.cs index 9285fcc729..9bb7924c97 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/ShadowFileSystemTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/ShadowFileSystemTests.cs @@ -10,6 +10,7 @@ using Umbraco.Cms.Core; using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.Hosting; using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Implementations; using Umbraco.Cms.Tests.Integration.Testing; @@ -573,6 +574,7 @@ public class ShadowFileSystemTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void ShadowScopeCompleteWithDirectoryConflict() { var path = HostingEnvironment.MapPathContentRoot("FileSysTests"); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/Mapping/ContentTypeModelMappingTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/Mapping/ContentTypeModelMappingTests.cs index 5a3c7723b3..00deeb6dd5 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/Mapping/ContentTypeModelMappingTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Mapping/ContentTypeModelMappingTests.cs @@ -13,6 +13,7 @@ using Umbraco.Cms.Core.PropertyEditors; using Umbraco.Cms.Core.Serialization; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -140,6 +141,7 @@ public class ContentTypeModelMappingTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void ContentTypeSave_To_IContentType() { // Arrange diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs index e9c4ac320b..fd398423dc 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs @@ -16,6 +16,7 @@ using Umbraco.Cms.Core.IO; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Packaging; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -217,6 +218,7 @@ public class CreatedPackagesRepositoryTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void Export_Zip() { var mt = MediaTypeBuilder.CreateImageMediaType("testImage"); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/PublishedContentQueryAccessorTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/PublishedContentQueryAccessorTests.cs index daa99b89a2..b3b6a8e82b 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/PublishedContentQueryAccessorTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/PublishedContentQueryAccessorTests.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using NUnit.Framework; using Umbraco.Cms.Core; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Integration.TestServerTest; namespace Umbraco.Cms.Tests.Integration.Umbraco.Core; @@ -12,6 +13,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core; public class PublishedContentQueryAccessorTests : UmbracoTestServerTestBase { [Test] + [LongRunning] public async Task PublishedContentQueryAccessor_WithRequestScope_WillProvideQuery() { var result = await Client.GetAsync("/demo-published-content-query-accessor"); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/ContentServiceTests.cs similarity index 99% rename from tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTests.cs rename to tests/Umbraco.Tests.Integration/Umbraco.Core/Services/ContentServiceTests.cs index d489e6a26c..a5a58135a5 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/ContentServiceTests.cs @@ -1,16 +1,11 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Threading; using Moq; using NUnit.Framework; using Umbraco.Cms.Core; using Umbraco.Cms.Core.Cache; -using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Events; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Notifications; @@ -20,14 +15,14 @@ using Umbraco.Cms.Core.Serialization; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Builders.Extensions; using Umbraco.Cms.Tests.Common.Extensions; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; -using Umbraco.Extensions; -namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services; +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Services; /// /// Tests covering all methods in the ContentService class. @@ -160,6 +155,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Get_All_Blueprints() { var template = TemplateBuilder.CreateTextPageTemplate(); @@ -190,6 +186,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Perform_Scheduled_Publishing() { var langUk = new LanguageBuilder() @@ -334,6 +331,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Get_Top_Version_Ids() { // Arrange @@ -354,6 +352,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Get_By_Ids_Sorted() { // Arrange @@ -570,6 +569,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_All_Versions_Of_Content() { var parent = ContentService.GetById(Textpage.Id); @@ -655,6 +655,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Content_For_Expiration() { // Arrange @@ -753,6 +754,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Publish_Culture_After_Last_Culture_Unpublished() { var content = CreateEnglishAndFrenchDocument(out var langUk, out var langFr, @@ -1387,6 +1389,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Failed_Publish_Should_Not_Update_Edited_State_When_Edited_True() { // Arrange @@ -1439,6 +1442,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent // V9 - Tests.Integration [Test] + [LongRunning] public void Failed_Publish_Should_Not_Update_Edited_State_When_Edited_False() { // Arrange @@ -1589,6 +1593,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Published_Descendant_Versions() { // Arrange @@ -1774,6 +1779,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Move_Content_Structure_To_RecycleBin_And_Empty_RecycleBin() { var contentType = ContentTypeService.Get("umbTextpage"); @@ -1830,6 +1836,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Ensures_Permissions_Are_Retained_For_Copied_Descendants_With_Explicit_Permissions() { // Arrange @@ -1870,6 +1877,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Ensures_Permissions_Are_Inherited_For_Copied_Descendants() { // Arrange @@ -1945,6 +1953,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Empty_RecycleBin_With_Content_That_Has_All_Related_Data() { // Arrange @@ -2317,6 +2326,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Rollback_Version_On_Multilingual() { var langFr = new LanguageBuilder() @@ -2624,6 +2634,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Delete_Previous_Versions_Not_Latest() { // Arrange @@ -2639,6 +2650,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Paged_Children() { // Start by cleaning the "db" @@ -2665,6 +2677,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Paged_Children_Dont_Get_Descendants() { // Start by cleaning the "db" @@ -2838,6 +2851,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Ensure_Invariant_Name() { var languageService = LocalizationService; @@ -2921,6 +2935,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Paged_Children_WithFilterAndOrder() { var languageService = LocalizationService; @@ -3054,6 +3069,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_SaveRead_Variations() { var languageService = LocalizationService; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/Variants/ContentVariantAllowedActionTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/Variants/ContentVariantAllowedActionTests.cs index 1c4142e287..a09b717f3b 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/Variants/ContentVariantAllowedActionTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Variants/ContentVariantAllowedActionTests.cs @@ -6,6 +6,7 @@ using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.ContentEditing; using Umbraco.Cms.Core.Models.Membership; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Builders.Extensions; using Umbraco.Cms.Tests.Integration.TestServerTest; @@ -32,6 +33,7 @@ public class ContentVariantAllowedActionTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public void CanCheckIfUserHasAccessToLanguage() { // setup user groups diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs b/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs index cb2e0d7a7a..fee54999db 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs @@ -5,6 +5,7 @@ using Newtonsoft.Json; using NUnit.Framework; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Constants = Umbraco.Cms.Core.Constants; @@ -19,6 +20,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Examine.Lucene.UmbracoExamine; public class IndexTest : ExamineBaseTest { [Test] + [LongRunning] public void GivenValidationParentNode_WhenContentIndexedUnderDifferentParent_DocumentIsNotIndexed() { using (GetSynchronousContentIndex(false, out var index, out _, out _, 999)) @@ -48,6 +50,7 @@ public class IndexTest : ExamineBaseTest } [Test] + [LongRunning] public void GivenIndexingDocument_WhenRichTextPropertyData_CanStoreImmenseFields() { using (GetSynchronousContentIndex(false, out var index, out _, out var contentValueSetBuilder)) @@ -85,6 +88,7 @@ public class IndexTest : ExamineBaseTest } [Test] + [LongRunning] public void GivenIndexingDocument_WhenGridPropertyData_ThenDataIndexedInSegregatedFields() { using (GetSynchronousContentIndex(false, out var index, out _, out var contentValueSetBuilder)) @@ -170,6 +174,7 @@ public class IndexTest : ExamineBaseTest } [Test] + [LongRunning] public void GivenEmptyIndex_WhenUsingWithContentAndMediaPopulators_ThenIndexPopulated() { var mediaRebuilder = IndexInitializer.GetMediaIndexRebuilder(IndexInitializer.GetMockMediaService()); @@ -190,6 +195,7 @@ public class IndexTest : ExamineBaseTest /// Check that the node signalled as protected in the content service is not present in the index. /// [Test] + [LongRunning] public void GivenPublishedContentIndex_WhenProtectedContentIndexed_ThenItIsIgnored() { using (GetSynchronousContentIndex(true, out var index, out var contentRebuilder, out _)) @@ -209,6 +215,7 @@ public class IndexTest : ExamineBaseTest } [Test] + [LongRunning] public void GivenMediaUnderNonIndexableParent_WhenMediaMovedUnderIndexableParent_ThenItIsIncludedInTheIndex() { // create a validator with @@ -245,6 +252,7 @@ public class IndexTest : ExamineBaseTest } [Test] + [LongRunning] public void GivenMediaUnderIndexableParent_WhenMediaMovedUnderNonIndexableParent_ThenItIsRemovedFromTheIndex() { // create a validator with @@ -288,6 +296,7 @@ public class IndexTest : ExamineBaseTest /// We then call the Examine method to re-index Content and do some comparisons to ensure that it worked correctly. /// [Test] + [LongRunning] public void GivenEmptyIndex_WhenIndexedWithContentPopulator_ThenTheIndexIsPopulated() { using (GetSynchronousContentIndex(false, out var index, out var contentRebuilder, out _)) @@ -325,6 +334,7 @@ public class IndexTest : ExamineBaseTest /// This will delete an item from the index and ensure that all children of the node are deleted too! /// [Test] + [LongRunning] public void GivenPopulatedIndex_WhenDocumentDeleted_ThenItsHierarchyIsAlsoDeleted() { using (GetSynchronousContentIndex(false, out var index, out var contentRebuilder, out _)) diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/PublishedContentQueryTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/PublishedContentQueryTests.cs index 1a9a37fd3b..37bd619aa9 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/PublishedContentQueryTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/PublishedContentQueryTests.cs @@ -9,6 +9,7 @@ using Umbraco.Cms.Core.Models.PublishedContent; using Umbraco.Cms.Core.PublishedCache; using Umbraco.Cms.Infrastructure; using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Directory = Lucene.Net.Store.Directory; @@ -95,6 +96,7 @@ public class PublishedContentQueryTests : ExamineBaseTest [TestCase("en-us", ExpectedResult = "1, 2", Description = "Search Culture: en-us. Must return both en-us and invariant results")] [TestCase("*", ExpectedResult = "1, 2, 3", Description = "Search Culture: *. Must return all cultures and all invariant results")] [TestCase(null, ExpectedResult = "1", Description = "Search Culture: null. Must return only invariant results")] + [LongRunning] public string Search(string culture) { using (var luceneDir = new RandomIdRAMDirectory()) diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/SearchTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/SearchTests.cs index 0b3a7ef45a..c4adddb434 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/SearchTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/SearchTests.cs @@ -9,6 +9,7 @@ using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Persistence.Querying; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Extensions; @@ -19,6 +20,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Examine.Lucene.UmbracoExamine; public class SearchTests : ExamineBaseTest { [Test] + [LongRunning] public void Test_Sort_Order_Sorting() { long totalRecs; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs index ff7b7a7275..ef7025c96d 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs @@ -14,6 +14,7 @@ using Umbraco.Cms.Core.PropertyEditors; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Packaging; using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; using Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importing; @@ -81,6 +82,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent private IMediaTypeService MediaTypeService => GetRequiredService(); [Test] + [LongRunning] public void Can_Import_uBlogsy_ContentTypes_And_Verify_Structure() { // Arrange @@ -128,6 +130,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Inherited_ContentTypes_And_Verify_PropertyTypes_UniqueIds() { // Arrange @@ -154,6 +157,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Inherited_ContentTypes_And_Verify_PropertyGroups_And_PropertyTypes() { // Arrange @@ -193,6 +197,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Template_Package_Xml() { // Arrange @@ -262,6 +267,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_StandardMvc_ContentTypes_Package_Xml() { // Arrange @@ -300,6 +306,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_StandardMvc_ContentTypes_And_Templates_Xml() { // Arrange @@ -326,6 +333,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Fanoe_Starterkit_ContentTypes_And_Templates_Xml() { // Arrange @@ -381,6 +389,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Media_Package_Xml() { // Arrange @@ -507,6 +516,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_ReImport_Single_DocType() { // Arrange @@ -726,6 +736,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Package_With_Compositions() { // Arrange diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/LocksTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/LocksTests.cs index 393f28668e..a7390ba6ef 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/LocksTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/LocksTests.cs @@ -12,6 +12,7 @@ using Umbraco.Cms.Core; using Umbraco.Cms.Core.DistributedLocking.Exceptions; using Umbraco.Cms.Infrastructure.Persistence.Dtos; using Umbraco.Cms.Persistence.Sqlite.Interceptors; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; using Umbraco.Extensions; @@ -155,6 +156,7 @@ public class LocksTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void ConcurrentWritersTest() { const int threadCount = 8; @@ -429,6 +431,7 @@ public class LocksTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void Throws_When_Lock_Timeout_Is_Exceeded_Write() { var counter = 0; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs index aae69e2f61..283d33ed20 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs @@ -20,6 +20,7 @@ using Umbraco.Cms.Core.Persistence.Repositories; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; using Umbraco.Cms.Infrastructure.Scoping; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Extensions; using Umbraco.Cms.Tests.Common.Testing; @@ -848,6 +849,7 @@ public class ContentTypeRepositoryTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Can_Verify_Addition_Of_PropertyType_After_ContentType_Is_Used() { // Arrange diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DocumentRepositoryTest.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DocumentRepositoryTest.cs index 9870926544..ec8bf73ca5 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DocumentRepositoryTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DocumentRepositoryTest.cs @@ -22,6 +22,7 @@ using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; using Umbraco.Cms.Infrastructure.Scoping; using Umbraco.Cms.Persistence.SqlServer.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -743,6 +744,7 @@ public class DocumentRepositoryTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void GetAllContentManyVersions() { IContent[] result; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/EntityRepositoryTest.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/EntityRepositoryTest.cs index 139a98a57a..3a80588e7f 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/EntityRepositoryTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/EntityRepositoryTest.cs @@ -12,6 +12,7 @@ using Umbraco.Cms.Core.Models.Entities; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; using Umbraco.Cms.Infrastructure.Scoping; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -23,6 +24,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repos public class EntityRepositoryTest : UmbracoIntegrationTest { [Test] + [LongRunning] public void Get_Paged_Mixed_Entities_By_Ids() { // Create content diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaRepositoryTest.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaRepositoryTest.cs index afe228a8fb..c852dd5f34 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaRepositoryTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaRepositoryTest.cs @@ -319,36 +319,6 @@ public class MediaRepositoryTest : UmbracoIntegrationTest } } - [Ignore("Unsupported feature.")] - [Test] - public void QueryMedia_ContentTypeAliasFilter() - { - // we could support this, but it would require an extra join on the query, - // and we don't absolutely need it now, so leaving it out for now - - // Arrange - var folderMediaType = MediaTypeService.Get(1031); - var provider = ScopeProvider; - using (var scope = provider.CreateScope()) - { - var repository = CreateRepository(provider, out var mediaTypeRepository); - - // Act - for (var i = 0; i < 10; i++) - { - var folder = MediaBuilder.CreateMediaFolder(folderMediaType, -1); - repository.Save(folder); - } - - string[] types = { "Folder" }; - var query = provider.CreateQuery().Where(x => types.Contains(x.ContentType.Alias)); - var result = repository.Get(query); - - // Assert - Assert.That(result.Count(), Is.GreaterThanOrEqualTo(11)); - } - } - [Test] public void GetPagedResultsByQuery_FirstPage() { diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PublicAccessRepositoryTest.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PublicAccessRepositoryTest.cs index a7c04d2503..ebaf627c0b 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PublicAccessRepositoryTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PublicAccessRepositoryTest.cs @@ -11,6 +11,7 @@ using Umbraco.Cms.Core.Persistence.Repositories; using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; using Umbraco.Cms.Infrastructure.Scoping; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -80,6 +81,7 @@ public class PublicAccessRepositoryTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Can_Add2() { var content = CreateTestData(3).ToArray(); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Runtime/FileSystemMainDomLockTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Runtime/FileSystemMainDomLockTests.cs index eea40a0b49..febc8f1e68 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Runtime/FileSystemMainDomLockTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Runtime/FileSystemMainDomLockTests.cs @@ -9,6 +9,7 @@ using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.Hosting; using Umbraco.Cms.Core.Runtime; using Umbraco.Cms.Infrastructure.Runtime; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Integration.Testing; namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Runtime; @@ -76,6 +77,7 @@ internal class FileSystemMainDomLockTests : UmbracoIntegrationTest } [Test] + [LongRunning] public async Task AcquireLockAsync_WhenTimeoutExceeded_ReturnsFalse() { await using var lockFile = File.Open(LockFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None); @@ -88,6 +90,7 @@ internal class FileSystemMainDomLockTests : UmbracoIntegrationTest } [Test] + [LongRunning] public async Task ListenAsync_WhenLockReleaseSignalFileFound_DropsLockFileHandle() { using var sut = FileSystemMainDomLock; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeTests.cs index 1f03b8ea49..8b7e8101c0 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeTests.cs @@ -13,6 +13,7 @@ using Umbraco.Cms.Core.Scoping; using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Infrastructure.Scoping; using Umbraco.Cms.Tests.Common; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; using Umbraco.Extensions; @@ -41,6 +42,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Scoping } [Test] + [LongRunning] public void GivenUncompletedScopeOnChildThread_WhenTheParentCompletes_TheTransactionIsRolledBack() { ScopeProvider scopeProvider = ScopeProvider; @@ -78,6 +80,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Scoping } [Test] + [LongRunning] public void GivenChildThread_WhenParentDisposedBeforeChild_ParentScopeThrows() { ScopeProvider scopeProvider = ScopeProvider; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopedNuCacheTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopedNuCacheTests.cs index 89e1543b1e..47b82c5cf2 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopedNuCacheTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopedNuCacheTests.cs @@ -12,6 +12,7 @@ using Umbraco.Cms.Core.Sync; using Umbraco.Cms.Core.Web; using Umbraco.Cms.Infrastructure.DependencyInjection; using Umbraco.Cms.Tests.Common; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; using Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Scoping; @@ -59,6 +60,7 @@ public class ScopedNuCacheTests : UmbracoIntegrationTest [TestCase(true)] [TestCase(false)] + [LongRunning] public void TestScope(bool complete) { var umbracoContext = UmbracoContextFactory.EnsureUmbracoContext().UmbracoContext; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs index fb25666efb..c5901cc226 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs @@ -18,6 +18,7 @@ using Umbraco.Cms.Core.Persistence.Repositories; using Umbraco.Cms.Core.Sync; using Umbraco.Cms.Core.Web; using Umbraco.Cms.Infrastructure.Sync; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -268,6 +269,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Validate Setup [Test] + [LongRunning] public void CreatedBranchIsOk() { IContent content1 = CreateBranch(); @@ -381,6 +383,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Save, Publish & Unpublish single content [Test] + [LongRunning] public void SaveUnpublishedContent() { // rule: when a content is saved, @@ -403,6 +406,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SavePublishedContent_ContentProperty1() { // rule: when a content is saved, @@ -438,6 +442,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SavePublishedContent_ContentProperty2() { // rule: when a content is saved, @@ -473,6 +478,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SavePublishedContent_UserProperty() { // rule: when a content is saved, @@ -508,6 +514,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SaveAndPublishUnpublishedContent() { // rule: when a content is saved&published, @@ -530,6 +537,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SaveAndPublishPublishedContent() { // rule: when a content is saved&published, @@ -553,6 +561,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void PublishUnpublishedContent() { // rule: when a content is published, @@ -578,6 +587,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void UnpublishContent() { // rule: when a content is unpublished, @@ -600,6 +610,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void UnpublishContentWithChanges() { // rule: when a content is unpublished, @@ -630,6 +641,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Publish & Unpublish branch [Test] + [LongRunning] public void UnpublishContentBranch() { // rule: when a content branch is unpublished, @@ -656,6 +668,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void PublishContentBranch() { // rule: when a content branch is published, @@ -689,6 +702,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void PublishContentBranchWithPublishedChildren() { // rule? @@ -726,6 +740,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void PublishContentBranchWithAllChildren() { // rule? @@ -775,6 +790,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Sort [Test] + [LongRunning] public void SortAll() { // rule: ? @@ -811,6 +827,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SortSome() { // rule: ? @@ -850,6 +867,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services // incl. trashing a branch, untrashing a single masked content // including emptying the recycle bin [Test] + [LongRunning] public void TrashUnpublishedContent() { IContent content = CreateContent(); @@ -868,6 +886,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void UntrashUnpublishedContent() { IContent content = CreateContent(); @@ -888,6 +907,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void TrashPublishedContent() { // does 1) unpublish and 2) trash @@ -910,6 +930,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void UntrashPublishedContent() { // same as unpublished as it's been unpublished @@ -936,6 +957,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void TrashPublishedContentWithChanges() { IContent content = CreateContent(); @@ -959,6 +981,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void TrashContentBranch() { IContent content1 = CreateBranch(); @@ -997,6 +1020,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void EmptyRecycleBinContent() { ContentService.EmptyRecycleBin(); @@ -1019,6 +1043,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void EmptyRecycleBinContents() { ContentService.EmptyRecycleBin(Constants.Security.SuperUserId); @@ -1046,6 +1071,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void EmptyRecycleBinBranch() { ContentService.EmptyRecycleBin(Constants.Security.SuperUserId); @@ -1092,6 +1118,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Delete [Test] + [LongRunning] public void DeleteUnpublishedContent() { IContent content = CreateContent(); @@ -1110,6 +1137,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void DeletePublishedContent() { IContent content = CreateContent(); @@ -1129,6 +1157,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void DeletePublishedContentWithChanges() { IContent content = CreateContent(); @@ -1150,6 +1179,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void DeleteMaskedPublishedContent() { IContent content1 = CreateContent(); @@ -1173,6 +1203,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void DeleteBranch() { IContent content1 = CreateBranch(); @@ -1216,6 +1247,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Move [Test] + [LongRunning] public void MoveUnpublishedContentUnderUnpublished() { IContent content1 = CreateContent(); @@ -1257,6 +1289,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MovePublishedContentWithChangesUnderUnpublished() { IContent content1 = CreateContent(); @@ -1280,6 +1313,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveUnpublishedContentUnderPublished() { IContent content1 = CreateContent(); @@ -1301,6 +1335,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveUnpublishedContentUnderMasked() { IContent content1 = CreateContent(); @@ -1374,6 +1409,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MovePublishedContentWithChangesUnderPublished() { IContent content1 = CreateContent(); @@ -1426,6 +1462,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveMaskedPublishedContentUnderPublished() { IContent content1 = CreateContent(); @@ -1452,6 +1489,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveMaskedPublishedContentUnderMasked() { IContent content1 = CreateContent(); @@ -1510,6 +1548,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveMaskedPublishedContentWithChangesUnderMasked() { IContent content1 = CreateContent(); @@ -1542,6 +1581,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveMaskedPublishedContentUnderUnpublished() { IContent content1 = CreateContent(); @@ -1594,6 +1634,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchUnderUnpublished() { IContent content1 = CreateBranch(); @@ -1634,6 +1675,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchUnderPublished() { IContent content1 = CreateBranch(); @@ -1675,6 +1717,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchUnderMasked() { IContent content1 = CreateBranch(); @@ -1720,6 +1763,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchBackFromPublished() { IContent content1 = CreateBranch(); @@ -1763,6 +1807,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchBackFromUnpublished() { IContent content1 = CreateBranch(); @@ -1805,6 +1850,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchBackFromMasked() { IContent content1 = CreateBranch(); @@ -1856,6 +1902,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Copy [Test] + [LongRunning] public void CopyUnpublishedContent() { IContent content = CreateContent(); @@ -1874,6 +1921,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void CopyPublishedContent() { IContent content = CreateContent(); @@ -1893,6 +1941,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void CopyMaskedContent() { IContent content = CreateContent(); @@ -1915,6 +1964,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void CopyBranch() { IContent content = CreateBranch(); @@ -1958,6 +2008,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Rollback [Test] + [LongRunning] public void Rollback() { IContent content = CreateContent(); @@ -1996,6 +2047,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Misc [Test] + [LongRunning] public void ContentRemembers() { IContent content = ContentService.GetRootContent().FirstOrDefault(); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceNotificationTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceNotificationTests.cs index 586eeb0873..45a0c0041a 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceNotificationTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceNotificationTests.cs @@ -11,6 +11,7 @@ using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Notifications; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -338,6 +339,7 @@ public class ContentServiceNotificationTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void Unpublishing_Culture() { LocalizationService.Save(new Language("fr-FR", "French (France)")); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs index bafd0aa138..33d7793e02 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs @@ -14,6 +14,7 @@ using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Persistence.Repositories; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.TestHelpers.Stubs; using Umbraco.Cms.Tests.Common.Testing; @@ -48,6 +49,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Retrieving_All_Content_In_Site() { // NOTE: Doing this the old 1 by 1 way and based on the results of the ContentServicePerformanceTest.Retrieving_All_Content_In_Site @@ -113,6 +115,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Creating_100_Items() { // Arrange @@ -132,6 +135,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Creating_1000_Items() { // Arrange @@ -151,6 +155,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Getting_100_Uncached_Items() { // Arrange @@ -178,6 +183,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Getting_1000_Uncached_Items() { // Arrange @@ -204,6 +210,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Getting_100_Cached_Items() { // Arrange @@ -233,6 +240,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Getting_1000_Cached_Items() { // Arrange diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs index f6e6aaf0a7..bee4e7d045 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs @@ -8,6 +8,7 @@ using NUnit.Framework; using Umbraco.Cms.Core; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -28,6 +29,7 @@ public class ContentServicePublishBranchTests : UmbracoIntegrationTest [TestCase(1)] // use overload w/ culture: "*" [TestCase(2)] // use overload w/ cultures: new [] { "*" } + [LongRunning] public void Can_Publish_Invariant_Branch(int method) { CreateTypes(out var iContentType, out _); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs index 9e6c17f6ad..55bd1187a6 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs @@ -12,6 +12,7 @@ using Umbraco.Cms.Core.Exceptions; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Notifications; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -75,6 +76,7 @@ public class ContentTypeServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void Deleting_Content_Type_With_Hierarchy_Of_Content_Items_Moves_Orphaned_Content_To_Recycle_Bin() { var template = TemplateBuilder.CreateTextPageTemplate(); @@ -126,6 +128,7 @@ public class ContentTypeServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void Deleting_Content_Types_With_Hierarchy_Of_Content_Items_Doesnt_Raise_Trashed_Event_For_Deleted_Items_1() { ContentNotificationHandler.MovedContentToRecycleBin = MovedContentToRecycleBin; @@ -176,6 +179,7 @@ public class ContentTypeServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void Deleting_Content_Types_With_Hierarchy_Of_Content_Items_Doesnt_Raise_Trashed_Event_For_Deleted_Items_2() { ContentNotificationHandler.MovedContentToRecycleBin = MovedContentToRecycleBin; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs index d4b9279487..e420cb1b1f 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs @@ -12,6 +12,7 @@ using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Sync; using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -82,6 +83,7 @@ public class ContentTypeServiceVariantsTests : UmbracoIntegrationTest [TestCase(ContentVariation.CultureAndSegment, ContentVariation.Culture, true)] [TestCase(ContentVariation.CultureAndSegment, ContentVariation.Segment, true)] [TestCase(ContentVariation.CultureAndSegment, ContentVariation.CultureAndSegment, false)] + [LongRunning] public void Change_Content_Type_Variation_Clears_Redirects(ContentVariation startingContentTypeVariation, ContentVariation changedContentTypeVariation, bool shouldUrlRedirectsBeCleared) { diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityServiceTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityServiceTests.cs index 3003d28f4c..f8270f5356 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityServiceTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityServiceTests.cs @@ -10,6 +10,7 @@ using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.Entities; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -191,6 +192,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Content_Descendants_Including_Recycled() { var contentType = ContentTypeService.Get("umbTextpage"); @@ -232,6 +234,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Content_Descendants_Without_Recycled() { var contentType = ContentTypeService.Get("umbTextpage"); @@ -274,6 +277,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Trashed_Content_Children() { var contentType = ContentTypeService.Get("umbTextpage"); @@ -379,6 +383,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Media_Descendants() { var folderType = MediaTypeService.Get(1031); @@ -411,6 +416,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Media_Descendants_Including_Recycled() { var folderType = MediaTypeService.Get(1031); @@ -453,6 +459,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Media_Descendants_Without_Recycled() { var folderType = MediaTypeService.Get(1031); @@ -496,6 +503,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Trashed_Media_Children() { var folderType = MediaTypeService.Get(1031); @@ -540,6 +548,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Media_Descendants_With_Search() { var folderType = MediaTypeService.Get(1031); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MediaTypeServiceTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MediaTypeServiceTests.cs index 3088e7c0da..dd5a2c1b3a 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MediaTypeServiceTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MediaTypeServiceTests.cs @@ -10,6 +10,7 @@ using Umbraco.Cms.Core.Events; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Notifications; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -94,6 +95,7 @@ public class MediaTypeServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void Deleting_Media_Types_With_Hierarchy_Of_Media_Items_Doesnt_Raise_Trashed_Event_For_Deleted_Items() { ContentNotificationHandler.MovedMediaToRecycleBin = MovedMediaToRecycleBin; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/RedirectUrlServiceTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/RedirectUrlServiceTests.cs index 7ebf4ab1d2..1d31815bef 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/RedirectUrlServiceTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/RedirectUrlServiceTests.cs @@ -11,6 +11,7 @@ using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; using Umbraco.Cms.Infrastructure.Scoping; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -58,6 +59,7 @@ public class RedirectUrlServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Most_Recent_RedirectUrl() { var redirect = RedirectUrlService.GetMostRecentRedirectUrl(Url); @@ -65,6 +67,7 @@ public class RedirectUrlServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Most_Recent_RedirectUrl_With_Culture() { var redirect = RedirectUrlService.GetMostRecentRedirectUrl(Url, CultureEnglish); @@ -72,6 +75,7 @@ public class RedirectUrlServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Most_Recent_RedirectUrl_With_Culture_When_No_CultureVariant_Exists() { var redirect = RedirectUrlService.GetMostRecentRedirectUrl(UrlAlt, UnusedCulture); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ThreadSafetyServiceTest.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ThreadSafetyServiceTest.cs index 3220f99b39..eedb2f3fd5 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ThreadSafetyServiceTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ThreadSafetyServiceTest.cs @@ -10,6 +10,7 @@ using NUnit.Framework; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -102,6 +103,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void Ensure_All_Threads_Execute_Successfully_Content_Service() { if (Environment.GetEnvironmentVariable("UMBRACO_TMP") != null) @@ -196,6 +198,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void Ensure_All_Threads_Execute_Successfully_Media_Service() { if (Environment.GetEnvironmentVariable("UMBRACO_TMP") != null) diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/TrackRelationsTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/TrackRelationsTests.cs index a7e1fbd803..cbcc0e4a3d 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/TrackRelationsTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/TrackRelationsTests.cs @@ -4,6 +4,7 @@ using Umbraco.Cms.Core; using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Testing; using Umbraco.Cms.Tests.Integration.Testing; @@ -31,6 +32,7 @@ public class TrackRelationsTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Automatically_Track_Relations() { var mt = MediaTypeBuilder.CreateSimpleMediaType("testMediaType", "Test Media Type"); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj b/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj index e616f11dad..48140b64dc 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj +++ b/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj @@ -6,8 +6,9 @@ true true Umbraco.Cms.Tests.Integration + true - + @@ -20,7 +21,7 @@ - + diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/BackOfficeAssetsControllerTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/BackOfficeAssetsControllerTests.cs index fa14b4ed83..550bb0356a 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/BackOfficeAssetsControllerTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/BackOfficeAssetsControllerTests.cs @@ -4,6 +4,7 @@ using System.Net; using System.Threading.Tasks; using NUnit.Framework; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Integration.TestServerTest; using Umbraco.Cms.Web.BackOffice.Controllers; @@ -13,6 +14,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.BackOffice.Controllers; public class BackOfficeAssetsControllerTests : UmbracoTestServerTestBase { [Test] + [LongRunning] public async Task EnsureSuccessStatusCode() { // Arrange diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs index d1a3caa2ea..1dea0091d2 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs @@ -11,6 +11,7 @@ using Umbraco.Cms.Core; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.ContentEditing; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Builders.Extensions; using Umbraco.Cms.Tests.Integration.TestServerTest; @@ -30,6 +31,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase /// Returns 404 if the content wasn't found based on the ID specified /// [Test] + [LongRunning] public async Task PostSave_Validate_Existing_Content() { var localizationService = GetRequiredService(); @@ -86,6 +88,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validate_At_Least_One_Variant_Flagged_For_Saving() { var localizationService = GetRequiredService(); @@ -154,6 +157,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase /// Returns 404 if any of the posted properties dont actually exist /// [Test] + [LongRunning] public async Task PostSave_Validate_Properties_Exist() { var localizationService = GetRequiredService(); @@ -217,6 +221,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Simple_Invariant() { var localizationService = GetRequiredService(); @@ -276,6 +281,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validate_Empty_Name() { var localizationService = GetRequiredService(); @@ -338,6 +344,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validate_Variants_Empty_Name() { var localizationService = GetRequiredService(); @@ -400,6 +407,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validates_Domains_Exist() { var localizationService = GetRequiredService(); @@ -447,6 +455,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validates_All_Ancestor_Cultures_Are_Considered() { var sweIso = "sv-SE"; @@ -534,6 +543,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validates_All_Cultures_Has_Domains() { var localizationService = GetRequiredService(); @@ -590,6 +600,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Checks_Ancestors_For_Domains() { var localizationService = GetRequiredService(); @@ -677,6 +688,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase [TestCase( @"

", true)] + [LongRunning] public async Task PostSave_Simple_RichText_With_Base64(string html, bool shouldHaveDataUri) { var url = PrepareApiControllerUrl(x => x.PostSave(null)); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/DataTypeControllerTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/DataTypeControllerTests.cs index 80ededff93..ed27a51aed 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/DataTypeControllerTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/DataTypeControllerTests.cs @@ -4,6 +4,7 @@ using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.ContentEditing; using Umbraco.Cms.Core.Serialization; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Builders.Extensions; using Umbraco.Cms.Tests.Integration.TestServerTest; @@ -19,6 +20,7 @@ public class DataTypeControllerTests : UmbracoTestServerTestBase [Test] [TestCase(true)] [TestCase(false)] + [LongRunning] public async Task Has_Values_Returns_Correct_Values(bool expectHasValues) { var dataTypeService = GetRequiredService(); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/EntityControllerTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/EntityControllerTests.cs index 52dd930ac5..0dc9e55a28 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/EntityControllerTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/EntityControllerTests.cs @@ -9,6 +9,7 @@ using Umbraco.Cms.Core; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Scoping; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Builders.Extensions; using Umbraco.Cms.Tests.Integration.TestServerTest; @@ -24,6 +25,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase private IScopeProvider ScopeProvider => GetRequiredService(); [Test] + [LongRunning] public async Task GetUrlsByIds_MediaWithIntegerIds_ReturnsValidMap() { var mediaTypeService = Services.GetRequiredService(); @@ -67,6 +69,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task GetUrlsByIds_Media_ReturnsEmptyStringsInMapForUnknownItems() { var queryParameters = new Dictionary { ["type"] = Constants.UdiEntityType.Media }; @@ -91,6 +94,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task GetUrlsByIds_MediaWithGuidIds_ReturnsValidMap() { var mediaTypeService = Services.GetRequiredService(); @@ -177,6 +181,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task GetUrlsByIds_Documents_ReturnsHashesInMapForUnknownItems() { var queryParameters = new Dictionary { ["type"] = Constants.UdiEntityType.Document }; @@ -201,6 +206,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task GetUrlsByIds_DocumentWithIntIds_ReturnsValidMap() { var contentTypeService = Services.GetRequiredService(); @@ -250,6 +256,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task GetUrlsByIds_DocumentWithGuidIds_ReturnsValidMap() { var contentTypeService = Services.GetRequiredService(); @@ -299,6 +306,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task GetUrlsByIds_DocumentWithUdiIds_ReturnsValidMap() { var contentTypeService = Services.GetRequiredService(); @@ -348,6 +356,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task GetByIds_MultipleCalls_WorksAsExpected() { var contentTypeService = Services.GetRequiredService(); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/TemplateQueryControllerTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/TemplateQueryControllerTests.cs index 0edaea5329..0b6d4dc289 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/TemplateQueryControllerTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/TemplateQueryControllerTests.cs @@ -7,6 +7,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using NUnit.Framework; using Umbraco.Cms.Core.Models.TemplateQuery; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders.Extensions; using Umbraco.Cms.Tests.Integration.TestServerTest; using Umbraco.Cms.Web.BackOffice.Controllers; @@ -19,6 +20,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.BackOffice.Controllers; public class TemplateQueryControllerTests : UmbracoTestServerTestBase { [Test] + [LongRunning] public async Task GetContentTypes__Ensure_camel_case() { var url = PrepareApiControllerUrl(x => x.GetContentTypes()); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/UsersControllerTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/UsersControllerTests.cs index c89841260a..9ebe896913 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/UsersControllerTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/UsersControllerTests.cs @@ -11,6 +11,7 @@ using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.ContentEditing; using Umbraco.Cms.Core.Models.Membership; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Builders.Extensions; using Umbraco.Cms.Tests.Integration.TestServerTest; @@ -24,6 +25,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.BackOffice.Controllers; public class UsersControllerTests : UmbracoTestServerTestBase { [Test] + [LongRunning] public async Task Save_User() { var url = PrepareApiControllerUrl(x => x.PostSaveUser(null)); @@ -70,6 +72,7 @@ public class UsersControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task GetPagedUsers_Empty() { // We get page 2 to force an empty response because there always in the useradmin user @@ -92,6 +95,7 @@ public class UsersControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task GetPagedUsers_multiple_pages() { var totalNumberOfUsers = 11; @@ -130,6 +134,7 @@ public class UsersControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostUnlockUsers_When_UserIds_Not_Supplied_Expect_Ok_Response() { var url = PrepareApiControllerUrl(x => x.PostUnlockUsers(Array.Empty())); @@ -141,6 +146,7 @@ public class UsersControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostUnlockUsers_When_User_Does_Not_Exist_Expect_Zero_Users_Message() { var userId = 42; // Must not exist @@ -157,6 +163,7 @@ public class UsersControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostUnlockUsers_When_One_UserId_Supplied_Expect_User_Locked_Out_With_Correct_Response_Message() { var userService = GetRequiredService(); @@ -186,6 +193,7 @@ public class UsersControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostUnlockUsers_When_Multiple_UserIds_Supplied_Expect_User_Locked_Out_With_Correct_Response_Message() { @@ -228,6 +236,7 @@ public class UsersControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task Cannot_Disable_Invited_User() { var userService = GetRequiredService(); @@ -258,6 +267,7 @@ public class UsersControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task Can_Disable_Active_User() { var userService = GetRequiredService(); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Filters/OutgoingEditorModelEventFilterTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Filters/OutgoingEditorModelEventFilterTests.cs index e627a3300f..efd6e8af65 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Filters/OutgoingEditorModelEventFilterTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Filters/OutgoingEditorModelEventFilterTests.cs @@ -11,6 +11,7 @@ using Umbraco.Cms.Core.Models.ContentEditing; using Umbraco.Cms.Core.Notifications; using Umbraco.Cms.Core.Serialization; using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Builders.Extensions; using Umbraco.Cms.Tests.Integration.TestServerTest; @@ -35,6 +36,7 @@ public class OutgoingEditorModelEventFilterTests : UmbracoTestServerTestBase public void Reset() => ResetNotifications(); [Test] + [LongRunning] public async Task Content_Item_With_Schedule_Raises_SendingContentNotification() { IContentTypeService contentTypeService = GetRequiredService(); @@ -69,6 +71,7 @@ public class OutgoingEditorModelEventFilterTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task Publish_Schedule_Is_Mapped_Correctly() { const string UsIso = "en-US"; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Web.Website/Routing/FrontEndRouteTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Web.Website/Routing/FrontEndRouteTests.cs index 2bc3dc3d89..d8383bc601 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.Website/Routing/FrontEndRouteTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.Website/Routing/FrontEndRouteTests.cs @@ -9,6 +9,7 @@ using Umbraco.Cms.Core.Routing; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Web; using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Integration.TestServerTest; using Umbraco.Cms.Web.Common.Attributes; using Umbraco.Cms.Web.Website.Controllers; @@ -48,6 +49,7 @@ public class SurfaceControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task Plugin_Controller_Routes_By_Area() { // Create URL manually, because PrepareSurfaceController URl will prepare whatever the controller is routed as diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Web.Website/Security/MemberAuthorizeTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Web.Website/Security/MemberAuthorizeTests.cs index 0fc1dfa85d..c2e7389f66 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.Website/Security/MemberAuthorizeTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.Website/Security/MemberAuthorizeTests.cs @@ -12,6 +12,7 @@ using Umbraco.Cms.Core.Security; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Web; using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Tests.Common.Attributes; using Umbraco.Cms.Tests.Integration.TestServerTest; using Umbraco.Cms.Web.Common.Controllers; using Umbraco.Cms.Web.Common.Filters; @@ -33,6 +34,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.Website.Security } [Test] + [LongRunning] public async Task Secure_SurfaceController_Should_Return_Redirect_WhenNotLoggedIn() { _memberManagerMock.Setup(x => x.IsLoggedIn()).Returns(false); @@ -47,6 +49,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.Website.Security } [Test] + [LongRunning] public async Task Secure_SurfaceController_Should_Return_Redirect_WhenNotAuthorized() { _memberManagerMock.Setup(x => x.IsLoggedIn()).Returns(true); @@ -67,6 +70,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.Website.Security [Test] + [LongRunning] public async Task Secure_ApiController_Should_Return_Unauthorized_WhenNotLoggedIn() { _memberManagerMock.Setup(x => x.IsLoggedIn()).Returns(false); @@ -78,6 +82,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.Website.Security } [Test] + [LongRunning] public async Task Secure_ApiController_Should_Return_Forbidden_WhenNotAuthorized() { _memberManagerMock.Setup(x => x.IsLoggedIn()).Returns(true); From 0a4cc27a5d01fbd4be9828e55a8e2a8d52c12f2b Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Thu, 14 Sep 2023 13:17:35 +0200 Subject: [PATCH 2/8] V12: Property editors should only contain layout when in preview mode (#14796) * Revert "Make sure the property editor layout is contained within its container (prevent Z-index bleed-through) (#13583)" This reverts commit 8463d906a747868ddbda3b1c01465f6cee1a589a. * remove seemingly unused attribute readonly * contain everything with contain:layout this is set if the property editor is in preview mode to make sure all overlays work * Revert "remove seemingly unused attribute readonly" This reverts commit 7a2743e8f664e707e8df5022fe754dfd77c508ea. --- .../src/less/components/umb-property-editor.less | 4 ++++ .../src/views/components/property/umb-property-editor.html | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-property-editor.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-property-editor.less index 6e16e76295..c34ada479e 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/umb-property-editor.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-property-editor.less @@ -1,6 +1,10 @@ .umb-property-editor { position: relative; contain: style; + + &.is-preview { + contain: layout; + } } .umb-property-editor--preview { diff --git a/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property-editor.html b/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property-editor.html index 8667fb84c2..b2387e230a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property-editor.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property-editor.html @@ -1,4 +1,4 @@ -
+
@@ -13,7 +13,7 @@
- +
From 8ccc2faee075693a05737b2470c9a71da4dbd651 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Thu, 14 Sep 2023 20:11:08 +0200 Subject: [PATCH 3/8] Add UsePagedSqlQuery setting to NucacheSettings (#14806) * imlement UsePagedSqlQuery * Remove unneccesary spacing --- .../Configuration/Models/NuCacheSettings.cs | 4 + .../Persistence/NuCacheContentRepository.cs | 102 ++++++++---------- 2 files changed, 47 insertions(+), 59 deletions(-) diff --git a/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs b/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs index b88dbb5d0d..cdf2557763 100644 --- a/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs @@ -14,6 +14,7 @@ public class NuCacheSettings internal const string StaticNuCacheSerializerType = "MessagePack"; internal const int StaticSqlPageSize = 1000; internal const int StaticKitBatchSize = 1; + internal const bool StaticUsePagedSqlQuery = true; /// /// Gets or sets a value defining the BTree block size. @@ -40,4 +41,7 @@ public class NuCacheSettings public int KitBatchSize { get; set; } = StaticKitBatchSize; public bool UnPublishedContentCompression { get; set; } = false; + + [DefaultValue(StaticUsePagedSqlQuery)] + public bool UsePagedSqlQuery { get; set; } = true; } diff --git a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs index 75208b2b16..af8c46821f 100644 --- a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs +++ b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs @@ -221,19 +221,12 @@ AND cmsContentNu.nodeId IS NULL .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Document)) .Append(SqlOrderByLevelIdSortOrder(SqlContext)); - // Use a more efficient COUNT query - Sql? sqlCountQuery = SqlContentSourcesCount() - .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Document)); - - Sql? sqlCount = - SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl"); - IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Document); - // We need to page here. We don't want to iterate over every single row in one connection cuz this can cause an SQL Timeout. - // We also want to read with a db reader and not load everything into memory, QueryPaged lets us do that. - foreach (ContentSourceDto row in Database.QueryPaged(_nucacheSettings.Value.SqlPageSize, sql, sqlCount)) + IEnumerable dtos = GetContentNodeDtos(sql); + + foreach (ContentSourceDto row in dtos) { yield return CreateContentNodeKit(row, serializer); } @@ -246,19 +239,12 @@ AND cmsContentNu.nodeId IS NULL .Append(SqlWhereNodeIdX(SqlContext, id)) .Append(SqlOrderByLevelIdSortOrder(SqlContext)); - // Use a more efficient COUNT query - Sql? sqlCountQuery = SqlContentSourcesCount(SqlContentSourcesSelectUmbracoNodeJoin) - .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Document)) - .Append(SqlWhereNodeIdX(SqlContext, id)); - Sql? sqlCount = - SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl"); - IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Document); - // We need to page here. We don't want to iterate over every single row in one connection cuz this can cause an SQL Timeout. - // We also want to read with a db reader and not load everything into memory, QueryPaged lets us do that. - foreach (ContentSourceDto row in Database.QueryPaged(_nucacheSettings.Value.SqlPageSize, sql, sqlCount)) + IEnumerable dtos = GetContentNodeDtos(sql); + + foreach (ContentSourceDto row in dtos) { yield return CreateContentNodeKit(row, serializer); } @@ -276,19 +262,12 @@ AND cmsContentNu.nodeId IS NULL .WhereIn(x => x.ContentTypeId, ids) .Append(SqlOrderByLevelIdSortOrder(SqlContext)); - // Use a more efficient COUNT query - Sql sqlCountQuery = SqlContentSourcesCount() - .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Document)) - .WhereIn(x => x.ContentTypeId, ids); - Sql? sqlCount = - SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl"); - IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Document); - // We need to page here. We don't want to iterate over every single row in one connection cuz this can cause an SQL Timeout. - // We also want to read with a db reader and not load everything into memory, QueryPaged lets us do that. - foreach (ContentSourceDto row in Database.QueryPaged(_nucacheSettings.Value.SqlPageSize, sql, sqlCount)) + IEnumerable dtos = GetContentNodeDtos(sql); + + foreach (ContentSourceDto row in dtos) { yield return CreateContentNodeKit(row, serializer); } @@ -319,18 +298,12 @@ AND cmsContentNu.nodeId IS NULL .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Media)) .Append(SqlOrderByLevelIdSortOrder(SqlContext)); - // Use a more efficient COUNT query - Sql? sqlCountQuery = SqlMediaSourcesCount() - .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Media)); - Sql? sqlCount = - SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl"); - IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Media); - // We need to page here. We don't want to iterate over every single row in one connection cuz this can cause an SQL Timeout. - // We also want to read with a db reader and not load everything into memory, QueryPaged lets us do that. - foreach (ContentSourceDto row in Database.QueryPaged(_nucacheSettings.Value.SqlPageSize, sql, sqlCount)) + IEnumerable dtos = GetContentNodeDtos(sql); + + foreach (ContentSourceDto row in dtos) { yield return CreateMediaNodeKit(row, serializer); } @@ -343,19 +316,12 @@ AND cmsContentNu.nodeId IS NULL .Append(SqlWhereNodeIdX(SqlContext, id)) .Append(SqlOrderByLevelIdSortOrder(SqlContext)); - // Use a more efficient COUNT query - Sql? sqlCountQuery = SqlMediaSourcesCount(SqlContentSourcesSelectUmbracoNodeJoin) - .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Media)) - .Append(SqlWhereNodeIdX(SqlContext, id)); - Sql? sqlCount = - SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl"); - IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Media); - // We need to page here. We don't want to iterate over every single row in one connection cuz this can cause an SQL Timeout. - // We also want to read with a db reader and not load everything into memory, QueryPaged lets us do that. - foreach (ContentSourceDto row in Database.QueryPaged(_nucacheSettings.Value.SqlPageSize, sql, sqlCount)) + IEnumerable dtos = GetContentNodeDtos(sql); + + foreach (ContentSourceDto row in dtos) { yield return CreateMediaNodeKit(row, serializer); } @@ -373,19 +339,12 @@ AND cmsContentNu.nodeId IS NULL .WhereIn(x => x.ContentTypeId, ids) .Append(SqlOrderByLevelIdSortOrder(SqlContext)); - // Use a more efficient COUNT query - Sql sqlCountQuery = SqlMediaSourcesCount() - .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Media)) - .WhereIn(x => x.ContentTypeId, ids); - Sql? sqlCount = - SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl"); - IContentCacheDataSerializer serializer = _contentCacheDataSerializerFactory.Create(ContentCacheDataSerializerEntityType.Media); - // We need to page here. We don't want to iterate over every single row in one connection cuz this can cause an SQL Timeout. - // We also want to read with a db reader and not load everything into memory, QueryPaged lets us do that. - foreach (ContentSourceDto row in Database.QueryPaged(_nucacheSettings.Value.SqlPageSize, sql, sqlCount)) + IEnumerable dtos = GetContentNodeDtos(sql); + + foreach (ContentSourceDto row in dtos) { yield return CreateMediaNodeKit(row, serializer); } @@ -1030,4 +989,29 @@ WHERE cmsContentNu.nodeId IN ( return s; } + + private IEnumerable GetContentNodeDtos(Sql sql) + { + // We need to page here. We don't want to iterate over every single row in one connection cuz this can cause an SQL Timeout. + // We also want to read with a db reader and not load everything into memory, QueryPaged lets us do that. + // QueryPaged is very slow on large sites however, so use fetch if UsePagedSqlQuery is disabled. + IEnumerable dtos; + if (_nucacheSettings.Value.UsePagedSqlQuery) + { + // Use a more efficient COUNT query + Sql? sqlCountQuery = SqlContentSourcesCount() + .Append(SqlObjectTypeNotTrashed(SqlContext, Constants.ObjectTypes.Document)); + + Sql? sqlCount = + SqlContext.Sql("SELECT COUNT(*) FROM (").Append(sqlCountQuery).Append(") npoco_tbl"); + + dtos = Database.QueryPaged(_nucacheSettings.Value.SqlPageSize, sql, sqlCount); + } + else + { + dtos = Database.Fetch(sql); + } + + return dtos; + } } From ec2134dea044ec20c4b9fefe2578005638f8a528 Mon Sep 17 00:00:00 2001 From: Sven Geusens Date: Fri, 15 Sep 2023 10:02:29 +0200 Subject: [PATCH 4/8] Disabled nighly build branch trigger (#14807) --- build/nightly-build-trigger.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/nightly-build-trigger.yml b/build/nightly-build-trigger.yml index b14db9abad..f8147da05c 100644 --- a/build/nightly-build-trigger.yml +++ b/build/nightly-build-trigger.yml @@ -1,5 +1,7 @@ name: Nightly_$(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) +trigger: none + schedules: - cron: '0 0 * * *' displayName: Daily midnight build From bf09c87f87feb297efeb587ad01827550ba38143 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Mon, 18 Sep 2023 13:48:11 +0200 Subject: [PATCH 5/8] Mention MultiUrlPickerValueConverter instead (#14818) Co-authored-by: Zeegaan --- .../DefaultPropertyValueConverterAttribute.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs b/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs index b74d9903cf..a414d76542 100644 --- a/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs @@ -16,11 +16,10 @@ public class DefaultPropertyValueConverterAttribute : Attribute /// a DefaultPropertyValueConverter can be more specific than another one. /// /// - /// An example where this is useful is that both the RelatedLiksEditorValueConverter and the JsonValueConverter + /// An example where this is useful is that both the MultiUrlPickerValueConverter and the JsonValueConverter /// will be returned as value converters for the Related Links Property editor, however the JsonValueConverter - /// is a very generic converter and the RelatedLiksEditorValueConverter is more specific than it, so the - /// RelatedLiksEditorValueConverter - /// can specify that it 'shadows' the JsonValueConverter. + /// is a very generic converter and the MultiUrlPickerValueConverter is more specific than it, so the + /// MultiUrlPickerValueConverter can specify that it 'shadows' the JsonValueConverter. /// public Type[] DefaultConvertersToShadow { get; } } From d9f3936a43ceff9aaef3f7569dcdd8ec63df4305 Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Tue, 19 Sep 2023 08:54:41 +0200 Subject: [PATCH 6/8] Updated dependencies to Forms and Deploy for JSON schema generation. (#14826) --- src/JsonSchema/JsonSchema.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/JsonSchema/JsonSchema.csproj b/src/JsonSchema/JsonSchema.csproj index 07a29835de..967a3c7aa1 100644 --- a/src/JsonSchema/JsonSchema.csproj +++ b/src/JsonSchema/JsonSchema.csproj @@ -12,7 +12,7 @@ - - + + From 6b72880c0bccf57365f96b58cc7fb934cb56be16 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Tue, 19 Sep 2023 09:01:35 +0200 Subject: [PATCH 7/8] fix: ensured that allowed user name characters are supported in backoffice users as well (#14810) (#14825) Co-authored-by: Arkadiusz Biel --- .../Security/ConfigureBackOfficeIdentityOptions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Web.BackOffice/Security/ConfigureBackOfficeIdentityOptions.cs b/src/Umbraco.Web.BackOffice/Security/ConfigureBackOfficeIdentityOptions.cs index e3f897018a..211528afab 100644 --- a/src/Umbraco.Web.BackOffice/Security/ConfigureBackOfficeIdentityOptions.cs +++ b/src/Umbraco.Web.BackOffice/Security/ConfigureBackOfficeIdentityOptions.cs @@ -38,6 +38,8 @@ public sealed class ConfigureBackOfficeIdentityOptions : IConfigureOptions Date: Wed, 20 Sep 2023 09:02:32 +0200 Subject: [PATCH 8/8] Added random delay in forgot password to lessen the risk the response times can be use to determine whether the mail exist or not. --- .../Controllers/AuthenticationController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs b/src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs index 1a55e164a6..4892f53012 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs @@ -1,5 +1,6 @@ using System.Globalization; using System.Security.Claims; +using System.Security.Cryptography; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; @@ -427,6 +428,8 @@ public class AuthenticationController : UmbracoApiControllerBase } } + await Task.Delay(RandomNumberGenerator.GetInt32(400, 2500)); + return Ok(); }