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

This commit is contained in:
Bjarke Berg
2024-03-15 15:58:41 +01:00
5 changed files with 6 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ public class LockingMechanism : ILockingMechanism
public void ReadLock(Guid instanceId, params int[] lockIds) => ReadLock(instanceId, null, lockIds);
/// <inheritdoc />
public void WriteLock(Guid instanceId, TimeSpan? timeout = null, params int[] lockIds) => EagerReadLockInner(instanceId, timeout, lockIds);
public void WriteLock(Guid instanceId, TimeSpan? timeout = null, params int[] lockIds) => EagerWriteLockInner(instanceId, timeout, lockIds);
public void WriteLock(Guid instanceId, params int[] lockIds) => WriteLock(instanceId, null, lockIds);

View File

@@ -49,6 +49,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
private IDataTypeService DataTypeService => GetRequiredService<IDataTypeService>();
private ILocalizedTextService LocalizedTextService => GetRequiredService<ILocalizedTextService>();
private ILanguageService LanguageService => GetRequiredService<ILanguageService>();
@@ -1251,7 +1252,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
Assert.IsFalse(content.HasIdentity);
// content cannot publish values because they are invalid
var propertyValidationService = new PropertyValidationService(PropertyEditorCollection, DataTypeService, ValueEditorCache, Mock.Of<ICultureDictionary>());
var propertyValidationService = new PropertyValidationService(PropertyEditorCollection, DataTypeService, LocalizedTextService, ValueEditorCache, Mock.Of<ICultureDictionary>());
var isValid = propertyValidationService.IsPropertyDataValid(content, out var invalidProperties,
CultureImpact.Invariant);
Assert.IsFalse(isValid);

View File

@@ -152,6 +152,7 @@ public class LocksTests : UmbracoIntegrationTest
Assert.AreEqual(0, sqlCount);
}
[NUnit.Framework.Ignore("We currently do not have a way to force lazy locks")]
[Test]
public void GivenNonEagerLocking_WhenDbIsAccessed_ThenSqlIsExecuted()
{

View File

@@ -649,6 +649,7 @@ public class VariationTests
return new PropertyValidationService(
propertyEditorCollection,
dataTypeService,
Mock.Of<ILocalizedTextService>(),
new ValueEditorCache(),
Mock.Of<ICultureDictionary>());
}

View File

@@ -44,7 +44,7 @@ public class PropertyValidationServiceTests
var propEditors = new PropertyEditorCollection(new DataEditorCollection(() => new[] { dataEditor }));
validationService = new PropertyValidationService(propEditors, dataTypeService.Object, new ValueEditorCache(), Mock.Of<ICultureDictionary>());
validationService = new PropertyValidationService(propEditors, dataTypeService.Object, Mock.Of<ILocalizedTextService>(),new ValueEditorCache(), Mock.Of<ICultureDictionary>());
}
[Test]