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 166f7034 SLING-12888: Parametrize AliasMapEntriesTest for
optimized/non-optimized testing - cleanup test setup
166f7034 is described below
commit 166f7034b8ba11735a8cd63560ea9ad45b80ebf3
Author: Julian Reschke <[email protected]>
AuthorDate: Thu Aug 14 14:41:04 2025 +0100
SLING-12888: Parametrize AliasMapEntriesTest for optimized/non-optimized
testing - cleanup test setup
---
.../resourceresolver/impl/mapping/AliasMapEntriesTest.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 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 fefdcbaf..b9cf340a 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
@@ -118,19 +118,15 @@ public class AliasMapEntriesTest extends
AbstractMappingMapEntriesTest {
when(bundle.getSymbolicName()).thenReturn("TESTBUNDLE");
when(bundleContext.getBundle()).thenReturn(bundle);
+
+
when(resourceResolverFactory.getAllowedAliasLocations()).thenReturn(Set.of());
+ when(resourceResolverFactory.getObservationPaths()).thenReturn(new
Path[] {new Path("/")});
when(resourceResolverFactory.getServiceResourceResolver(any(Map.class))).thenReturn(resourceResolver);
- when(resourceResolverFactory.isVanityPathEnabled()).thenReturn(true);
-
when(resourceResolverFactory.getVanityPathConfig()).thenReturn(List.of());
when(resourceResolverFactory.isOptimizeAliasResolutionEnabled()).thenReturn(isOptimizeAliasResolutionEnabled);
- when(resourceResolverFactory.getObservationPaths()).thenReturn(new
Path[] {new Path("/")});
when(resourceResolverFactory.getMapRoot()).thenReturn(MapEntries.DEFAULT_MAP_ROOT);
-
when(resourceResolverFactory.getMaxCachedVanityPathEntries()).thenReturn(-1L);
-
when(resourceResolverFactory.isMaxCachedVanityPathEntriesStartup()).thenReturn(true);
+
when(resourceResolver.findResources(anyString(),
eq("sql"))).thenReturn(Collections.emptyIterator());
when(resourceResolver.findResources(anyString(),
eq("JCR-SQL2"))).thenReturn(Collections.emptyIterator());
- //
when(resourceResolverFactory.getAliasPath()).thenReturn(Arrays.asList("/child"));
-
-
when(resourceResolverFactory.getAllowedAliasLocations()).thenReturn(Set.of());
Optional<ResourceResolverMetrics> metrics = Optional.empty();