GERONIMO-6577 - Enabling the tests in jenkins.  Fixing the case where only providers are registered.

git-svn-id: https://svn.apache.org/repos/asf/geronimo/components/config/trunk@1806651 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/impl/internal-suite.xml b/impl/internal-suite.xml
new file mode 100644
index 0000000..2652628
--- /dev/null
+++ b/impl/internal-suite.xml
@@ -0,0 +1,30 @@
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~  http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<suite name="microprofileconfig-TCK" verbose="2" configfailurepolicy="continue" >
+
+    <test name="Geronimo Tests">
+        <packages>
+            <package name="org.apache.geronimo.config.test.internal.*">
+            </package>
+        </packages>
+    </test>
+
+</suite>
diff --git a/impl/pom.xml b/impl/pom.xml
index 6133927..6e048e2 100644
--- a/impl/pom.xml
+++ b/impl/pom.xml
@@ -88,6 +88,7 @@
                 <configuration>
                     <suiteXmlFiles>
                         <suiteXmlFile>tck-suite.xml</suiteXmlFile>
+                        <suiteXmlFile>internal-suite.xml</suiteXmlFile>
                     </suiteXmlFiles>
                     <environmentVariables>
                         <CDPATH>value-for-tck-since-we-ignore-empty</CDPATH>
diff --git a/impl/src/main/java/org/apache/geronimo/config/cdi/ConfigExtension.java b/impl/src/main/java/org/apache/geronimo/config/cdi/ConfigExtension.java
index ac8bfb5..c3252bc 100644
--- a/impl/src/main/java/org/apache/geronimo/config/cdi/ConfigExtension.java
+++ b/impl/src/main/java/org/apache/geronimo/config/cdi/ConfigExtension.java
@@ -75,6 +75,13 @@
                 .map(ip -> REPLACED_TYPES.getOrDefault(ip.getType(), ip.getType()))
                 .collect(Collectors.toSet());
 
+        Set<Type> providerTypes = injectionPoints.stream()
+                .filter(NOT_PROVIDERS.negate())
+                .map(ip -> ((ParameterizedType)ip.getType()).getActualTypeArguments()[0])
+                .collect(Collectors.toSet());
+
+        types.addAll(providerTypes);
+
         types.stream()
                 .map(type -> new ConfigInjectionBean(bm, type))
                 .forEach(abd::addBean);
diff --git a/impl/src/test/java/org/apache/geronimo/config/test/internal/ProviderTest.java b/impl/src/test/java/org/apache/geronimo/config/test/internal/ProviderTest.java
index 8df9615..98ad024 100644
--- a/impl/src/test/java/org/apache/geronimo/config/test/internal/ProviderTest.java
+++ b/impl/src/test/java/org/apache/geronimo/config/test/internal/ProviderTest.java
@@ -30,25 +30,21 @@
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-
 public class ProviderTest extends Arquillian {
     private static final String SOME_KEY = "org.apache.geronimo.config.test.internal.somekey";
-    private static final String ANOTHER_KEY = "org.apache.geronimo.config.test.internal.anotherkey";
 
     @Deployment
     public static WebArchive deploy() {
         System.setProperty(SOME_KEY, "someval");
-        System.setProperty(ANOTHER_KEY, "someval");
         JavaArchive testJar = ShrinkWrap
                 .create(JavaArchive.class, "configProviderTest.jar")
                 .addClasses(ProviderTest.class, SomeBean.class)
                 .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
                 .as(JavaArchive.class);
 
-        WebArchive war = ShrinkWrap
+        return ShrinkWrap
                 .create(WebArchive.class, "providerTest.war")
                 .addAsLibrary(testJar);
-        return war;
     }
 
     private @Inject SomeBean someBean;
@@ -73,16 +69,9 @@
         @ConfigProperty(name=SOME_KEY)
         private Provider<String> myconfig;
 
-        @Inject
-        @ConfigProperty(name=ANOTHER_KEY)
-        private Provider<String> anotherconfig;
-
         public String getMyconfig() {
             return myconfig.get();
         }
 
-        public Provider<String> getAnotherconfig() {
-            return anotherconfig;
-        }
     }
 }