This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch SLING-12888
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git
The following commit(s) were added to refs/heads/SLING-12888 by this push:
new 2cfdaa9f SLING-12888: Parametrize AliasMapEntriesTest for
optimized/non-optimized testing - fix test conditions for the two tests
specific to the non-optimized case
2cfdaa9f is described below
commit 2cfdaa9f82de22d88576229ee427ac08e5cd3b0d
Author: Julian Reschke <[email protected]>
AuthorDate: Thu Aug 14 14:44:29 2025 +0100
SLING-12888: Parametrize AliasMapEntriesTest for optimized/non-optimized
testing - fix test conditions for the two tests specific to the non-optimized
case
---
.../resourceresolver/impl/mapping/AliasMapEntriesTest.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/AliasMapEntriesTest.java
b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/AliasMapEntriesTest.java
index b9cf340a..9aff9f43 100644
---
a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/AliasMapEntriesTest.java
+++
b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/AliasMapEntriesTest.java
@@ -467,9 +467,9 @@ public class AliasMapEntriesTest extends
AbstractMappingMapEntriesTest {
// SLING-3727
@Test
public void test_doAddAliasAttributesWithDisableAliasOptimization() throws
Exception {
-
when(resourceResolverFactory.isOptimizeAliasResolutionEnabled()).thenReturn(false);
- mapEntries = new MapEntries(
- resourceResolverFactory, bundleContext, eventAdmin,
stringInterpolationProvider, metrics);
+ Assume.assumeFalse(
+ "checks behaviour for non-optimized case only",
+ resourceResolverFactory.isOptimizeAliasResolutionEnabled());
Resource parent = createMockedResource("/parent");
Resource result = createMockedResource(parent, "child");
@@ -485,9 +485,9 @@ public class AliasMapEntriesTest extends
AbstractMappingMapEntriesTest {
// SLING-3727
@Test
public void test_doUpdateAttributesWithDisableAliasOptimization() throws
Exception {
-
when(resourceResolverFactory.isOptimizeAliasResolutionEnabled()).thenReturn(false);
- mapEntries = new MapEntries(
- resourceResolverFactory, bundleContext, eventAdmin,
stringInterpolationProvider, metrics);
+ Assume.assumeFalse(
+ "checks behaviour for non-optimized case only",
+ resourceResolverFactory.isOptimizeAliasResolutionEnabled());
Resource parent = createMockedResource("/parent");
Resource result = createMockedResource(parent, "child");