diff --git a/bundle/src/test/java/com/adobe/acs/commons/it/build/ScrMetadataIT.java b/bundle/src/test/java/com/adobe/acs/commons/it/build/ScrMetadataIT.java index 14668c4549..e6f5a36695 100644 --- a/bundle/src/test/java/com/adobe/acs/commons/it/build/ScrMetadataIT.java +++ b/bundle/src/test/java/com/adobe/acs/commons/it/build/ScrMetadataIT.java @@ -370,15 +370,16 @@ private Descriptor parseMetatype(InputStream is, String name) throws IOException StartElement start = event.asStartElement(); String elementName = start.getName().getLocalPart(); if (elementName.equals("Designate")) { - Attribute pidAttribute = start.getAttributeByName(new QName("pid")); + // Felix SCR Generator incorrectly generates both attributes "factoryPid" and "pid" for factories + Attribute pidAttribute = start.getAttributeByName(new QName("factoryPid")); if (pidAttribute != null) { result.name = pidAttribute.getValue(); + result.factory = true; } else { - pidAttribute = start.getAttributeByName(new QName("factoryPid")); + pidAttribute = start.getAttributeByName(new QName("pid")); if (pidAttribute != null) { result.name = pidAttribute.getValue(); } - result.factory = true; } } else if (elementName.equals("AD")) { String propName = start.getAttributeByName(new QName("id")).getValue();