Merge remote-tracking branch 'origin/v12/dev' into v13/dev

# Conflicts:
#	tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml
This commit is contained in:
Bjarke Berg
2023-09-20 10:11:12 +02:00
73 changed files with 556 additions and 194 deletions

View File

@@ -5,4 +5,4 @@
<DiagnosticId>PKV006</DiagnosticId>
<Target>net7.0</Target>
</Suppression>
</Suppressions>
</Suppressions>

View File

@@ -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
/// </summary>
[Test]
[LongRunning]
public async Task Start_And_Stop_Umbraco_With_Components_Enabled()
{
var runtime = Services.GetRequiredService<IRuntime>();

View File

@@ -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;

View File

@@ -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");

View File

@@ -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<MediaFileManager>();

View File

@@ -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");

View File

@@ -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;
@@ -139,6 +140,7 @@ public class ContentTypeModelMappingTests : UmbracoIntegrationTest
}
[Test]
[LongRunning]
public void ContentTypeSave_To_IContentType()
{
// Arrange

View File

@@ -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;
@@ -216,6 +217,7 @@ public class CreatedPackagesRepositoryTests : UmbracoIntegrationTest
}
[Test]
[LongRunning]
public void Export_Zip()
{
var mt = MediaTypeBuilder.CreateImageMediaType("testImage");

View File

@@ -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");

View File

@@ -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.Notifications;
@@ -19,14 +16,14 @@ using Umbraco.Cms.Core.Serialization;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Infrastructure.Persistence;
using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement;
using Umbraco.Cms.Tests.Common.Attributes;
using Umbraco.Cms.Tests.Common.Builders;
using Umbraco.Cms.Tests.Common.Builders.Extensions;
using Umbraco.Cms.Tests.Common.Extensions;
using Umbraco.Cms.Tests.Common.Testing;
using Umbraco.Cms.Tests.Integration.Testing;
using Umbraco.Extensions;
namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services;
namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Services;
/// <summary>
/// Tests covering all methods in the ContentService class.
@@ -159,6 +156,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Get_All_Blueprints()
{
var template = TemplateBuilder.CreateTextPageTemplate();
@@ -189,6 +187,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Perform_Scheduled_Publishing()
{
var langUk = new LanguageBuilder()
@@ -333,6 +332,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Get_Top_Version_Ids()
{
// Arrange
@@ -353,6 +353,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Get_By_Ids_Sorted()
{
// Arrange
@@ -569,6 +570,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Get_All_Versions_Of_Content()
{
var parent = ContentService.GetById(Textpage.Id);
@@ -654,6 +656,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Get_Content_For_Expiration()
{
// Arrange
@@ -752,6 +755,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,
@@ -1386,6 +1390,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Failed_Publish_Should_Not_Update_Edited_State_When_Edited_True()
{
// Arrange
@@ -1438,6 +1443,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
// V9 - Tests.Integration
[Test]
[LongRunning]
public void Failed_Publish_Should_Not_Update_Edited_State_When_Edited_False()
{
// Arrange
@@ -1588,6 +1594,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Get_Published_Descendant_Versions()
{
// Arrange
@@ -1773,6 +1780,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Move_Content_Structure_To_RecycleBin_And_Empty_RecycleBin()
{
var contentType = ContentTypeService.Get("umbTextpage");
@@ -1829,6 +1837,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Ensures_Permissions_Are_Retained_For_Copied_Descendants_With_Explicit_Permissions()
{
// Arrange
@@ -1869,6 +1878,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Ensures_Permissions_Are_Inherited_For_Copied_Descendants()
{
// Arrange
@@ -1944,6 +1954,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Empty_RecycleBin_With_Content_That_Has_All_Related_Data()
{
// Arrange
@@ -2316,6 +2327,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Rollback_Version_On_Multilingual()
{
var langFr = new LanguageBuilder()
@@ -2623,6 +2635,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Delete_Previous_Versions_Not_Latest()
{
// Arrange
@@ -2638,6 +2651,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Get_Paged_Children()
{
// Start by cleaning the "db"
@@ -2664,6 +2678,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Get_Paged_Children_Dont_Get_Descendants()
{
// Start by cleaning the "db"
@@ -2837,6 +2852,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Ensure_Invariant_Name()
{
var languageService = LocalizationService;
@@ -2920,6 +2936,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Get_Paged_Children_WithFilterAndOrder()
{
var languageService = LocalizationService;
@@ -3053,6 +3070,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_SaveRead_Variations()
{
var languageService = LocalizationService;

View File

@@ -6,6 +6,7 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.ContentEditing;
using Umbraco.Cms.Core.Models.Membership;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Tests.Common.Attributes;
using Umbraco.Cms.Tests.Common.Builders;
using Umbraco.Cms.Tests.Common.Builders.Extensions;
using Umbraco.Cms.Tests.Integration.TestServerTest;
@@ -32,6 +33,7 @@ public class ContentVariantAllowedActionTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public void CanCheckIfUserHasAccessToLanguage()
{
// setup user groups

View File

@@ -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.
/// </summary>
[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.
/// </summary>
[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!
/// </summary>
[Test]
[LongRunning]
public void GivenPopulatedIndex_WhenDocumentDeleted_ThenItsHierarchyIsAlsoDeleted()
{
using (GetSynchronousContentIndex(false, out var index, out var contentRebuilder, out _))

View File

@@ -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())

View File

@@ -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;

View File

@@ -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;
@@ -80,6 +81,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent
private IMediaTypeService MediaTypeService => GetRequiredService<IMediaTypeService>();
[Test]
[LongRunning]
public void Can_Import_uBlogsy_ContentTypes_And_Verify_Structure()
{
// Arrange
@@ -127,6 +129,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Import_Inherited_ContentTypes_And_Verify_PropertyTypes_UniqueIds()
{
// Arrange
@@ -153,6 +156,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Import_Inherited_ContentTypes_And_Verify_PropertyGroups_And_PropertyTypes()
{
// Arrange
@@ -192,6 +196,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Import_Template_Package_Xml()
{
// Arrange
@@ -261,6 +266,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Import_StandardMvc_ContentTypes_Package_Xml()
{
// Arrange
@@ -299,6 +305,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Import_StandardMvc_ContentTypes_And_Templates_Xml()
{
// Arrange
@@ -325,6 +332,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Import_Fanoe_Starterkit_ContentTypes_And_Templates_Xml()
{
// Arrange
@@ -380,6 +388,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Import_Media_Package_Xml()
{
// Arrange
@@ -506,6 +515,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_ReImport_Single_DocType()
{
// Arrange
@@ -725,6 +735,7 @@ public class PackageDataInstallationTests : UmbracoIntegrationTestWithContent
}
[Test]
[LongRunning]
public void Can_Import_Package_With_Compositions()
{
// Arrange

View File

@@ -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;

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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<IMedia>().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()
{

View File

@@ -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();

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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();

View File

@@ -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;
@@ -337,6 +338,7 @@ public class ContentServiceNotificationTests : UmbracoIntegrationTest
}
[Test]
[LongRunning]
public void Unpublishing_Culture()
{
LocalizationService.Save(new Language("fr-FR", "French (France)"));

View File

@@ -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

View File

@@ -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 _);

View File

@@ -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;

View File

@@ -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;
@@ -81,6 +82,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)
{

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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)

View File

@@ -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");

View File

@@ -7,6 +7,7 @@
<RootNamespace>Umbraco.Cms.Tests.Integration</RootNamespace>
<IsPackable>true</IsPackable>
<EnablePackageValidation>true</EnablePackageValidation>
<GenerateCompatibilitySuppressionFile>true</GenerateCompatibilitySuppressionFile>
</PropertyGroup>
<ItemGroup>

View File

@@ -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

View File

@@ -11,6 +11,7 @@ using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.ContentEditing;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Tests.Common.Attributes;
using Umbraco.Cms.Tests.Common.Builders;
using Umbraco.Cms.Tests.Common.Builders.Extensions;
using Umbraco.Cms.Tests.Integration.TestServerTest;
@@ -30,6 +31,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
/// Returns 404 if the content wasn't found based on the ID specified
/// </summary>
[Test]
[LongRunning]
public async Task PostSave_Validate_Existing_Content()
{
var localizationService = GetRequiredService<ILocalizationService>();
@@ -86,6 +88,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task PostSave_Validate_At_Least_One_Variant_Flagged_For_Saving()
{
var localizationService = GetRequiredService<ILocalizationService>();
@@ -154,6 +157,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
/// Returns 404 if any of the posted properties dont actually exist
/// </summary>
[Test]
[LongRunning]
public async Task PostSave_Validate_Properties_Exist()
{
var localizationService = GetRequiredService<ILocalizationService>();
@@ -217,6 +221,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task PostSave_Simple_Invariant()
{
var localizationService = GetRequiredService<ILocalizationService>();
@@ -276,6 +281,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task PostSave_Validate_Empty_Name()
{
var localizationService = GetRequiredService<ILocalizationService>();
@@ -338,6 +344,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task PostSave_Validate_Variants_Empty_Name()
{
var localizationService = GetRequiredService<ILocalizationService>();
@@ -400,6 +407,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task PostSave_Validates_Domains_Exist()
{
var localizationService = GetRequiredService<ILocalizationService>();
@@ -447,6 +455,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task PostSave_Validates_All_Ancestor_Cultures_Are_Considered()
{
var sweIso = "sv-SE";
@@ -534,6 +543,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task PostSave_Validates_All_Cultures_Has_Domains()
{
var localizationService = GetRequiredService<ILocalizationService>();
@@ -590,6 +600,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task PostSave_Checks_Ancestors_For_Domains()
{
var localizationService = GetRequiredService<ILocalizationService>();
@@ -677,6 +688,7 @@ public class ContentControllerTests : UmbracoTestServerTestBase
[TestCase(
@"<p><img alt src=""data:image/notallowedextension;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7""></p>",
true)]
[LongRunning]
public async Task PostSave_Simple_RichText_With_Base64(string html, bool shouldHaveDataUri)
{
var url = PrepareApiControllerUrl<ContentController>(x => x.PostSave(null));

View File

@@ -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<IDataTypeService>();

View File

@@ -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<IScopeProvider>();
[Test]
[LongRunning]
public async Task GetUrlsByIds_MediaWithIntegerIds_ReturnsValidMap()
{
var mediaTypeService = Services.GetRequiredService<IMediaTypeService>();
@@ -67,6 +69,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task GetUrlsByIds_Media_ReturnsEmptyStringsInMapForUnknownItems()
{
var queryParameters = new Dictionary<string, object> { ["type"] = Constants.UdiEntityType.Media };
@@ -91,6 +94,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task GetUrlsByIds_MediaWithGuidIds_ReturnsValidMap()
{
var mediaTypeService = Services.GetRequiredService<IMediaTypeService>();
@@ -177,6 +181,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task GetUrlsByIds_Documents_ReturnsHashesInMapForUnknownItems()
{
var queryParameters = new Dictionary<string, object> { ["type"] = Constants.UdiEntityType.Document };
@@ -201,6 +206,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task GetUrlsByIds_DocumentWithIntIds_ReturnsValidMap()
{
var contentTypeService = Services.GetRequiredService<IContentTypeService>();
@@ -250,6 +256,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task GetUrlsByIds_DocumentWithGuidIds_ReturnsValidMap()
{
var contentTypeService = Services.GetRequiredService<IContentTypeService>();
@@ -299,6 +306,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task GetUrlsByIds_DocumentWithUdiIds_ReturnsValidMap()
{
var contentTypeService = Services.GetRequiredService<IContentTypeService>();
@@ -348,6 +356,7 @@ public class EntityControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task GetByIds_MultipleCalls_WorksAsExpected()
{
var contentTypeService = Services.GetRequiredService<IContentTypeService>();

View File

@@ -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<TemplateQueryController>(x => x.GetContentTypes());

View File

@@ -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<UsersController>(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<UsersController>(x => x.PostUnlockUsers(Array.Empty<int>()));
@@ -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<IUserService>();
@@ -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<IUserService>();
@@ -258,6 +267,7 @@ public class UsersControllerTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task Can_Disable_Active_User()
{
var userService = GetRequiredService<IUserService>();

View File

@@ -10,6 +10,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;
@@ -34,6 +35,7 @@ public class OutgoingEditorModelEventFilterTests : UmbracoTestServerTestBase
public void Reset() => ResetNotifications();
[Test]
[LongRunning]
public async Task Content_Item_With_Schedule_Raises_SendingContentNotification()
{
IContentTypeService contentTypeService = GetRequiredService<IContentTypeService>();
@@ -68,6 +70,7 @@ public class OutgoingEditorModelEventFilterTests : UmbracoTestServerTestBase
}
[Test]
[LongRunning]
public async Task Publish_Schedule_Is_Mapped_Correctly()
{
const string UsIso = "en-US";

View File

@@ -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

View File

@@ -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);