diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index a92f879b6f..afbd565af6 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: 18.16.0 @@ -292,12 +312,30 @@ stages: version: $(dotnetVersion) 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' @@ -339,12 +377,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..f8147da05c --- /dev/null +++ b/build/nightly-build-trigger.yml @@ -0,0 +1,34 @@ +name: Nightly_$(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) + +trigger: none + +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/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs b/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs index 490e03096d..309c4560cf 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. @@ -39,4 +40,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.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; } } 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; + } } diff --git a/src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs b/src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs index d3a47157c0..cce95fd609 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; @@ -429,6 +430,8 @@ public class AuthenticationController : UmbracoApiControllerBase } } + await Task.Delay(RandomNumberGenerator.GetInt32(400, 2500)); + return Ok(); } 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 $scope.preview($scope.content, defaultPreviewUrl, 'umbpreview'), + labelKey: "buttons_saveAndPreview" + }; + + const activeVariant = content.variants?.find((variant) => variant.compositeId === compositeId); + + $scope.previewSubButtons = activeVariant?.additionalPreviewUrls?.map((additionalPreviewUrl) => { + return { + alias: 'preview_' + additionalPreviewUrl.name, + label: additionalPreviewUrl.name, + // We use target _blank here. If we open the window in the same tab with a 'umb_preview_name' target, we get a cors js error. + handler: () => $scope.preview(content, additionalPreviewUrl.url, '_blank') + } + }); + $scope.page.showPreviewButton = true; } @@ -952,13 +987,13 @@ } }; - $scope.preview = function (content) { + $scope.preview = function (content, url, urlTarget) { - const openPreviewWindow = () => { + const openPreviewWindow = (url, target) => { // Chromes popup blocker will kick in if a window is opened // without the initial scoped request. This trick will fix that. - const previewWindow = $window.open(`preview/?id=${content.id}${$scope.culture ? `&culture=${$scope.culture}` : ''}`, 'umbpreview'); + const previewWindow = $window.open(url, target); previewWindow.addEventListener('load', () => { previewWindow.location.href = previewWindow.document.URL; @@ -969,7 +1004,7 @@ //The user cannot save if they don't have access to do that, in which case we just want to preview //and that's it otherwise they'll get an unauthorized access message if (!_.contains(content.allowedActions, "A")) { - openPreviewWindow(); + openPreviewWindow(url, urlTarget); } else { var selectedVariant = $scope.content.variants[0]; @@ -988,7 +1023,7 @@ //ensure the save flag is set for the active variant selectedVariant.save = true; performSave({ saveMethod: $scope.saveMethod(), action: "save" }).then(function (data) { - openPreviewWindow() + openPreviewWindow(url, urlTarget); }, function (err) { //validation issues .... }); 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 d2d6a970b9..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: layout; + contain: style; + + &.is-preview { + contain: layout; + } } .umb-property-editor--preview { diff --git a/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button-group.html b/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button-group.html index 0462482112..f47b00913d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button-group.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button-group.html @@ -48,7 +48,8 @@ hotkey="{{subButton.hotKey}}" hotkey-when-hidden="{{subButton.hotKeyWhenHidden}}" ng-disabled="disabled"> - {{subButton.labelKey}} + {{subButton.labelKey}} + {{subButton.label}} ... diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html b/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html index f031b4da9d..97ecb95f31 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html @@ -43,15 +43,16 @@ disabled="page.uploadsInProgress"> - - + +
@@ -13,7 +13,7 @@
- +
diff --git a/src/Umbraco.Web.UI.New.Client b/src/Umbraco.Web.UI.New.Client index 40e04294f5..96df70e1e4 160000 --- a/src/Umbraco.Web.UI.New.Client +++ b/src/Umbraco.Web.UI.New.Client @@ -1 +1 @@ -Subproject commit 40e04294f5924558d7c1a33e5f5416d5815a90c7 +Subproject commit 96df70e1e4f06ab77b7bdb640b438130119929a2 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 index 2ff5f38afb..b09991494d 100644 --- a/tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml +++ b/tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml @@ -29,4 +29,4 @@ lib/net7.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/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs b/tests/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs index a13affb340..518a4f58b4 100644 --- a/tests/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs +++ b/tests/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs @@ -4,6 +4,7 @@ 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; @@ -12,6 +13,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 c5f4d62a61..80809fb77c 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/Events/EventAggregatorTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Events/EventAggregatorTests.cs @@ -5,6 +5,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; @@ -19,6 +20,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 97871c81a7..f34e4d1d04 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/FileSystemsTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/FileSystemsTests.cs @@ -7,6 +7,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; @@ -32,6 +33,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 6b9f3ae042..a60a90cee2 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/ShadowFileSystemTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/IO/ShadowFileSystemTests.cs @@ -9,6 +9,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; @@ -572,6 +573,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 89bb0473f6..f47d2f1c0d 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/Mapping/ContentTypeModelMappingTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Mapping/ContentTypeModelMappingTests.cs @@ -12,6 +12,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; @@ -127,6 +128,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 fa6b5a6e27..e417dc2494 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs @@ -15,6 +15,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; @@ -213,6 +214,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 108c3dab19..aca58313df 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/PublishedContentQueryAccessorTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/PublishedContentQueryAccessorTests.cs @@ -3,6 +3,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; @@ -11,6 +12,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 44c460fd4c..c03cd5b6f0 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/ContentServiceTests.cs @@ -3,13 +3,10 @@ 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.Models.ContentEditing; @@ -20,6 +17,7 @@ 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; @@ -28,7 +26,7 @@ using Umbraco.Cms.Tests.Integration.Testing; using Umbraco.Extensions; using Language = Umbraco.Cms.Core.Models.Language; -namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services; +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Services; /// /// Tests covering all methods in the ContentService class. @@ -161,6 +159,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Get_All_Blueprints() { var template = TemplateBuilder.CreateTextPageTemplate(); @@ -191,6 +190,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public async Task Perform_Scheduled_Publishing() { var langUk = new LanguageBuilder() @@ -335,6 +335,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Get_Top_Version_Ids() { // Arrange @@ -355,6 +356,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Get_By_Ids_Sorted() { // Arrange @@ -571,6 +573,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_All_Versions_Of_Content() { var parent = ContentService.GetById(Textpage.Id); @@ -656,6 +659,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Content_For_Expiration() { // Arrange @@ -754,6 +758,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, @@ -1388,6 +1393,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Failed_Publish_Should_Not_Update_Edited_State_When_Edited_True() { // Arrange @@ -1440,6 +1446,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent // V9 - Tests.Integration [Test] + [LongRunning] public void Failed_Publish_Should_Not_Update_Edited_State_When_Edited_False() { // Arrange @@ -1590,6 +1597,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Published_Descendant_Versions() { // Arrange @@ -1775,6 +1783,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Move_Content_Structure_To_RecycleBin_And_Empty_RecycleBin() { var contentType = ContentTypeService.Get("umbTextpage"); @@ -1831,6 +1840,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Ensures_Permissions_Are_Retained_For_Copied_Descendants_With_Explicit_Permissions() { // Arrange @@ -1871,6 +1881,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Ensures_Permissions_Are_Inherited_For_Copied_Descendants() { // Arrange @@ -1946,6 +1957,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public async Task Can_Empty_RecycleBin_With_Content_That_Has_All_Related_Data() { // Arrange @@ -2322,6 +2334,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public async Task Can_Rollback_Version_On_Multilingual() { var langFr = new LanguageBuilder() @@ -2629,6 +2642,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Delete_Previous_Versions_Not_Latest() { // Arrange @@ -2644,6 +2658,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Paged_Children() { // Start by cleaning the "db" @@ -2670,6 +2685,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Get_Paged_Children_Dont_Get_Descendants() { // Start by cleaning the "db" @@ -2843,6 +2859,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public async Task Ensure_Invariant_Name() { var languageService = LanguageService; @@ -2926,6 +2943,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public async Task Can_Get_Paged_Children_WithFilterAndOrder() { var languageService = LanguageService; @@ -3059,6 +3077,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public async Task Can_SaveRead_Variations() { var languageService = LanguageService; diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/Variants/ContentVariantAllowedActionTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/Variants/ContentVariantAllowedActionTests.cs index 1dcb595549..c68742580f 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 async Task 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 47b39b3bfc..3f56bc4f0f 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs @@ -7,6 +7,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 Umbraco.Extensions; @@ -22,6 +23,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)) @@ -51,6 +53,7 @@ public class IndexTest : ExamineBaseTest } [Test] + [LongRunning] public void GivenIndexingDocument_WhenRichTextPropertyData_CanStoreImmenseFields() { using (GetSynchronousContentIndex(false, out var index, out _, out var contentValueSetBuilder)) @@ -88,6 +91,7 @@ public class IndexTest : ExamineBaseTest } [Test] + [LongRunning] public void GivenIndexingDocument_WhenGridPropertyData_ThenDataIndexedInSegregatedFields() { using (GetSynchronousContentIndex(false, out var index, out _, out var contentValueSetBuilder)) @@ -173,6 +177,7 @@ public class IndexTest : ExamineBaseTest } [Test] + [LongRunning] public void GivenEmptyIndex_WhenUsingWithContentAndMediaPopulators_ThenIndexPopulated() { var mediaRebuilder = IndexInitializer.GetMediaIndexRebuilder(IndexInitializer.GetMockMediaService()); @@ -193,6 +198,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 _)) @@ -212,6 +218,7 @@ public class IndexTest : ExamineBaseTest } [Test] + [LongRunning] public void GivenMediaUnderNonIndexableParent_WhenMediaMovedUnderIndexableParent_ThenItIsIncludedInTheIndex() { // create a validator with @@ -248,6 +255,7 @@ public class IndexTest : ExamineBaseTest } [Test] + [LongRunning] public void GivenMediaUnderIndexableParent_WhenMediaMovedUnderNonIndexableParent_ThenItIsRemovedFromTheIndex() { // create a validator with @@ -291,6 +299,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 _)) @@ -328,6 +337,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 80aa1fe662..84e4be9d60 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; @@ -96,6 +97,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 41ba42dc86..2e360ca4cf 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/SearchTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/SearchTests.cs @@ -8,6 +8,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; @@ -18,6 +19,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 845ecf64c6..6f90cd3a94 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs @@ -13,6 +13,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; @@ -87,6 +88,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_uBlogsy_ContentTypes_And_Verify_Structure() { // Arrange @@ -134,6 +136,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Inherited_ContentTypes_And_Verify_PropertyTypes_UniqueIds() { // Arrange @@ -160,6 +163,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Inherited_ContentTypes_And_Verify_PropertyGroups_And_PropertyTypes() { // Arrange @@ -199,6 +203,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Template_Package_Xml() { // Arrange @@ -268,6 +273,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_StandardMvc_ContentTypes_Package_Xml() { // Arrange @@ -306,6 +312,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_StandardMvc_ContentTypes_And_Templates_Xml() { // Arrange @@ -332,6 +339,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Fanoe_Starterkit_ContentTypes_And_Templates_Xml() { // Arrange @@ -387,6 +395,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_Import_Media_Package_Xml() { // Arrange @@ -513,6 +522,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent } [Test] + [LongRunning] public void Can_ReImport_Single_DocType() { // Arrange @@ -732,6 +742,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 51b1a3a179..88b48dfaae 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/LocksTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/LocksTests.cs @@ -11,6 +11,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; @@ -154,6 +155,7 @@ public class LocksTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void ConcurrentWritersTest() { const int threadCount = 8; @@ -428,6 +430,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 594b117d21..bfa9e0c75a 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs @@ -19,6 +19,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; @@ -847,6 +848,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 5a2f80557b..f4cee39978 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DocumentRepositoryTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DocumentRepositoryTest.cs @@ -21,6 +21,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; @@ -742,6 +743,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 6ab977b783..86b0363050 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/EntityRepositoryTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/EntityRepositoryTest.cs @@ -11,6 +11,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; @@ -22,6 +23,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 595e881f28..932be80a01 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaRepositoryTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaRepositoryTest.cs @@ -318,36 +318,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 0e9be1a93e..0de919eac8 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PublicAccessRepositoryTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PublicAccessRepositoryTest.cs @@ -10,6 +10,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; @@ -79,6 +80,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 a2ba3bb4c4..00425a9cfe 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeTests.cs @@ -12,6 +12,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; @@ -40,6 +41,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Scoping } [Test] + [LongRunning] public void GivenUncompletedScopeOnChildThread_WhenTheParentCompletes_TheTransactionIsRolledBack() { ScopeProvider scopeProvider = ScopeProvider; @@ -77,6 +79,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 9186f44cf1..777b4cafb8 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopedNuCacheTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopedNuCacheTests.cs @@ -11,6 +11,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; @@ -58,6 +59,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 73b8c63464..fda265c705 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs @@ -14,6 +14,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; @@ -263,6 +264,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Validate Setup [Test] + [LongRunning] public void CreatedBranchIsOk() { IContent content1 = CreateBranch(); @@ -376,6 +378,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, @@ -398,6 +401,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SavePublishedContent_ContentProperty1() { // rule: when a content is saved, @@ -433,6 +437,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SavePublishedContent_ContentProperty2() { // rule: when a content is saved, @@ -468,6 +473,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SavePublishedContent_UserProperty() { // rule: when a content is saved, @@ -503,6 +509,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SaveAndPublishUnpublishedContent() { // rule: when a content is saved&published, @@ -525,6 +532,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SaveAndPublishPublishedContent() { // rule: when a content is saved&published, @@ -548,6 +556,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void PublishUnpublishedContent() { // rule: when a content is published, @@ -573,6 +582,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void UnpublishContent() { // rule: when a content is unpublished, @@ -595,6 +605,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void UnpublishContentWithChanges() { // rule: when a content is unpublished, @@ -625,6 +636,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, @@ -651,6 +663,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void PublishContentBranch() { // rule: when a content branch is published, @@ -684,6 +697,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void PublishContentBranchWithPublishedChildren() { // rule? @@ -721,6 +735,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void PublishContentBranchWithAllChildren() { // rule? @@ -770,6 +785,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Sort [Test] + [LongRunning] public void SortAll() { // rule: ? @@ -806,6 +822,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void SortSome() { // rule: ? @@ -845,6 +862,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(); @@ -863,6 +881,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void UntrashUnpublishedContent() { IContent content = CreateContent(); @@ -883,6 +902,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void TrashPublishedContent() { // does 1) unpublish and 2) trash @@ -905,6 +925,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void UntrashPublishedContent() { // same as unpublished as it's been unpublished @@ -931,6 +952,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void TrashPublishedContentWithChanges() { IContent content = CreateContent(); @@ -954,6 +976,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void TrashContentBranch() { IContent content1 = CreateBranch(); @@ -992,6 +1015,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void EmptyRecycleBinContent() { ContentService.EmptyRecycleBin(); @@ -1014,6 +1038,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void EmptyRecycleBinContents() { ContentService.EmptyRecycleBin(Constants.Security.SuperUserId); @@ -1041,6 +1066,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void EmptyRecycleBinBranch() { ContentService.EmptyRecycleBin(Constants.Security.SuperUserId); @@ -1087,6 +1113,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Delete [Test] + [LongRunning] public void DeleteUnpublishedContent() { IContent content = CreateContent(); @@ -1105,6 +1132,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void DeletePublishedContent() { IContent content = CreateContent(); @@ -1124,6 +1152,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void DeletePublishedContentWithChanges() { IContent content = CreateContent(); @@ -1145,6 +1174,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void DeleteMaskedPublishedContent() { IContent content1 = CreateContent(); @@ -1168,6 +1198,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void DeleteBranch() { IContent content1 = CreateBranch(); @@ -1211,6 +1242,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Move [Test] + [LongRunning] public void MoveUnpublishedContentUnderUnpublished() { IContent content1 = CreateContent(); @@ -1252,6 +1284,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MovePublishedContentWithChangesUnderUnpublished() { IContent content1 = CreateContent(); @@ -1275,6 +1308,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveUnpublishedContentUnderPublished() { IContent content1 = CreateContent(); @@ -1296,6 +1330,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveUnpublishedContentUnderMasked() { IContent content1 = CreateContent(); @@ -1369,6 +1404,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MovePublishedContentWithChangesUnderPublished() { IContent content1 = CreateContent(); @@ -1421,6 +1457,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveMaskedPublishedContentUnderPublished() { IContent content1 = CreateContent(); @@ -1447,6 +1484,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveMaskedPublishedContentUnderMasked() { IContent content1 = CreateContent(); @@ -1505,6 +1543,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveMaskedPublishedContentWithChangesUnderMasked() { IContent content1 = CreateContent(); @@ -1537,6 +1576,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveMaskedPublishedContentUnderUnpublished() { IContent content1 = CreateContent(); @@ -1589,6 +1629,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchUnderUnpublished() { IContent content1 = CreateBranch(); @@ -1629,6 +1670,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchUnderPublished() { IContent content1 = CreateBranch(); @@ -1670,6 +1712,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchUnderMasked() { IContent content1 = CreateBranch(); @@ -1715,6 +1758,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchBackFromPublished() { IContent content1 = CreateBranch(); @@ -1758,6 +1802,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchBackFromUnpublished() { IContent content1 = CreateBranch(); @@ -1800,6 +1845,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void MoveContentBranchBackFromMasked() { IContent content1 = CreateBranch(); @@ -1851,6 +1897,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Copy [Test] + [LongRunning] public void CopyUnpublishedContent() { IContent content = CreateContent(); @@ -1869,6 +1916,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void CopyPublishedContent() { IContent content = CreateContent(); @@ -1888,6 +1936,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void CopyMaskedContent() { IContent content = CreateContent(); @@ -1910,6 +1959,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services } [Test] + [LongRunning] public void CopyBranch() { IContent content = CreateBranch(); @@ -1953,6 +2003,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services #region Rollback [Test] + [LongRunning] public void Rollback() { IContent content = CreateContent(); @@ -1991,6 +2042,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 7ab9fea048..52a39a8caa 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceNotificationTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceNotificationTests.cs @@ -10,6 +10,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; @@ -336,6 +337,7 @@ public class ContentServiceNotificationTests : UmbracoIntegrationTest } [Test] + [LongRunning] public async Task Unpublishing_Culture() { await LanguageService.CreateAsync(new Language("fr-FR", "French (France)"), Constants.Security.SuperUserKey); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs index c1522589fe..bca229cbd9 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs @@ -13,6 +13,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; @@ -47,6 +48,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 @@ -112,6 +114,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Creating_100_Items() { // Arrange @@ -131,6 +134,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Creating_1000_Items() { // Arrange @@ -150,6 +154,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Getting_100_Uncached_Items() { // Arrange @@ -177,6 +182,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Getting_1000_Uncached_Items() { // Arrange @@ -203,6 +209,7 @@ public class ContentServicePerformanceTest : UmbracoIntegrationTest } [Test] + [LongRunning] public void Getting_100_Cached_Items() { // Arrange @@ -232,6 +239,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 6cfa2f8169..023cde3625 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs @@ -7,6 +7,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; @@ -27,6 +28,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 365b03bb80..f5f21b8d53 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs @@ -11,6 +11,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; @@ -74,6 +75,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(); @@ -125,6 +127,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; @@ -175,6 +178,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 7752a54af4..57808b2981 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs @@ -11,6 +11,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; @@ -80,6 +81,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 55288f612d..475fa69559 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityServiceTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityServiceTests.cs @@ -9,6 +9,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; @@ -190,6 +191,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Content_Descendants_Including_Recycled() { var contentType = ContentTypeService.Get("umbTextpage"); @@ -231,6 +233,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Content_Descendants_Without_Recycled() { var contentType = ContentTypeService.Get("umbTextpage"); @@ -273,6 +276,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Trashed_Content_Children() { var contentType = ContentTypeService.Get("umbTextpage"); @@ -378,6 +382,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Media_Descendants() { var folderType = MediaTypeService.Get(1031); @@ -410,6 +415,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Media_Descendants_Including_Recycled() { var folderType = MediaTypeService.Get(1031); @@ -452,6 +458,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Media_Descendants_Without_Recycled() { var folderType = MediaTypeService.Get(1031); @@ -495,6 +502,7 @@ public class EntityServiceTests : UmbracoIntegrationTest } [Test] + [LongRunning] public void EntityService_Can_Get_Paged_Trashed_Media_Children() { var folderType = MediaTypeService.Get(1031); @@ -539,6 +547,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 caceb8e2cb..6c779a3c6e 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MediaTypeServiceTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/MediaTypeServiceTests.cs @@ -9,6 +9,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; @@ -93,6 +94,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 d74ba7583d..72c046ef36 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ThreadSafetyServiceTest.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ThreadSafetyServiceTest.cs @@ -9,6 +9,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; @@ -101,6 +102,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) @@ -195,6 +197,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 2243e5dfb7..f2dcf3bae3 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj +++ b/tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj @@ -7,6 +7,7 @@ Umbraco.Cms.Tests.Integration true true + true 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 36375cd313..3741136a0c 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs @@ -8,6 +8,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; @@ -26,6 +27,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 languageService = GetRequiredService(); @@ -84,6 +86,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validate_At_Least_One_Variant_Flagged_For_Saving() { var languageService = 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 languageService = GetRequiredService(); @@ -219,6 +223,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Simple_Invariant() { var languageService = GetRequiredService(); @@ -280,6 +285,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validate_Empty_Name() { var languageService = GetRequiredService(); @@ -344,6 +350,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validate_Variants_Empty_Name() { var languageService = GetRequiredService(); @@ -408,6 +415,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validates_Domains_Exist() { var languageService = GetRequiredService(); @@ -457,6 +465,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validates_All_Ancestor_Cultures_Are_Considered() { var sweIso = "sv-SE"; @@ -558,6 +567,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Validates_All_Cultures_Has_Domains() { var languageService = GetRequiredService(); @@ -621,6 +631,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase } [Test] + [LongRunning] public async Task PostSave_Checks_Ancestors_For_Domains() { var languageService = GetRequiredService(); @@ -721,6 +732,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 fc9e5413ab..353c95acab 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Filters/OutgoingEditorModelEventFilterTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/Filters/OutgoingEditorModelEventFilterTests.cs @@ -8,6 +8,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; @@ -31,6 +32,7 @@ public class OutgoingEditorModelEventFilterTests : UmbracoTestServerTestBase public void Reset() => ResetNotifications(); [Test] + [LongRunning] public async Task Content_Item_With_Schedule_Raises_SendingContentNotification() { IContentTypeService contentTypeService = GetRequiredService(); @@ -65,6 +67,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); diff --git a/tools/Umbraco.JsonSchema/Umbraco.JsonSchema.csproj b/tools/Umbraco.JsonSchema/Umbraco.JsonSchema.csproj index c9275c6b94..90f301b2a1 100644 --- a/tools/Umbraco.JsonSchema/Umbraco.JsonSchema.csproj +++ b/tools/Umbraco.JsonSchema/Umbraco.JsonSchema.csproj @@ -12,5 +12,6 @@ +