joerghoh commented on code in PR #189:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/189#discussion_r2273567848


##########
src/test/java/org/apache/sling/resourceresolver/impl/mapping/AliasMapEntriesTest.java:
##########
@@ -487,18 +487,19 @@ public void 
test_doUpdateAttributesWithDisableAliasOptimization() throws Excepti
 
         Resource parent = createMockedResource("/parent");
         Resource result = createMockedResource("/parent/child");
-
-        // TODO: using attachChildResource causes the test to fail
-        // attachChildResource(parent, result);
-
-        when(result.getParent()).thenReturn(parent);
+        attachChildResource(parent, result);
 
         
when(result.getValueMap()).thenReturn(buildValueMap(ResourceResolverImpl.PROP_ALIAS,
 "alias"));
+        Map<String, Collection<String>> aliasMapBefore = 
mapEntries.getAliasMap("/parent");
+        assertEquals(1, aliasMapBefore.size());
 
+        // this simulates an add event, but that is immaterial here as there 
is no cache anyway
         addResource(mapEntries, "/parent/child", new AtomicBoolean());
 
-        Map<String, Collection<String>> aliasMap = 
mapEntries.getAliasMap("/parent");
-        assertEquals(Collections.emptyMap(), aliasMap);
+        Map<String, Collection<String>> aliasMapAfter = 
mapEntries.getAliasMap("/parent");
+        assertEquals(1, aliasMapAfter.size());

Review Comment:
   isn't this a different assertion?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to