Modified test case to reproduce the FELIX-4832 issue.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1667671 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/AutoConfigTest.java b/dependencymanager/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/AutoConfigTest.java
index 0e2ca8f..4ce6936 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/AutoConfigTest.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/AutoConfigTest.java
@@ -18,18 +18,19 @@
*/
package org.apache.felix.dm.itest.api;
+import java.util.ArrayList;
import java.util.Dictionary;
import java.util.Hashtable;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
-import org.junit.Assert;
-
import org.apache.felix.dm.Component;
import org.apache.felix.dm.DependencyManager;
import org.apache.felix.dm.itest.util.Ensure;
import org.apache.felix.dm.itest.util.TestBase;
+import org.junit.Assert;
import org.osgi.framework.Constants;
/**
@@ -179,6 +180,7 @@
public class ConsumerWithIterableField {
final Iterable<Provider> m_providers = new ConcurrentLinkedQueue<>();
+ final List m_notInjectMe = new ArrayList();
void start() {
Assert.assertNotNull(m_providers);
@@ -188,6 +190,8 @@
found ++;
}
Assert.assertTrue(found == 2);
+ // The "m_notInjectMe" should not be injected with anything
+ Assert.assertEquals(m_notInjectMe.size(), 0);
m_ensure.step(3);
}