You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2014/09/18 17:08:28 UTC
git commit: Improve itest coverage and remove old spring version
dependencies
Repository: karaf
Updated Branches:
refs/heads/karaf-2.x b30599674 -> 0b097321b
Improve itest coverage and remove old spring version dependencies
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/0b097321
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/0b097321
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/0b097321
Branch: refs/heads/karaf-2.x
Commit: 0b097321bd74e09a02ae70ea91ccd668524c30b8
Parents: b305996
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Thu Sep 18 17:08:00 2014 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Thu Sep 18 17:08:00 2014 +0200
----------------------------------------------------------------------
itests/pom.xml | 12 +
.../karaf/itests/EnterpriseFeaturesTest.java | 96 +++++-
.../apache/karaf/itests/KarafTestSupport.java | 68 +++-
.../apache/karaf/itests/SpringFeaturesTest.java | 309 +++++++++++++++++++
.../karaf/itests/StandardFeaturesTest.java | 116 +++----
pom.xml | 12 +-
6 files changed, 503 insertions(+), 110 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/0b097321/itests/pom.xml
----------------------------------------------------------------------
diff --git a/itests/pom.xml b/itests/pom.xml
index e878097..9264594 100644
--- a/itests/pom.xml
+++ b/itests/pom.xml
@@ -124,6 +124,12 @@
<configuration>
<systemPropertyVariables>
<org.ops4j.pax.logging.DefaultServiceLog.level>INFO</org.ops4j.pax.logging.DefaultServiceLog.level>
+ <hibernate3.version>${hibernate3.version}</hibernate3.version>
+ <hibernate42.version>${hibernate42.version}</hibernate42.version>
+ <hibernate43.version>${hibernate43.version}</hibernate43.version>
+ <spring31.version>${spring31.version}</spring31.version>
+ <spring32.version>${spring32.version}</spring32.version>
+ <spring40.version>${spring40.version}</spring40.version>
</systemPropertyVariables>
</configuration>
</plugin>
@@ -149,6 +155,12 @@
<argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>
<systemPropertyVariables>
<org.ops4j.pax.logging.DefaultServiceLog.level>INFO</org.ops4j.pax.logging.DefaultServiceLog.level>
+ <hibernate3.version>${hibernate3.version}</hibernate3.version>
+ <hibernate42.version>${hibernate42.version}</hibernate42.version>
+ <hibernate43.version>${hibernate43.version}</hibernate43.version>
+ <spring31.version>${spring31.version}</spring31.version>
+ <spring32.version>${spring32.version}</spring32.version>
+ <spring40.version>${spring40.version}</spring40.version>
</systemPropertyVariables>
</configuration>
</plugin>
http://git-wip-us.apache.org/repos/asf/karaf/blob/0b097321/itests/src/test/java/org/apache/karaf/itests/EnterpriseFeaturesTest.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/karaf/itests/EnterpriseFeaturesTest.java b/itests/src/test/java/org/apache/karaf/itests/EnterpriseFeaturesTest.java
index 70756e3..e16320f 100644
--- a/itests/src/test/java/org/apache/karaf/itests/EnterpriseFeaturesTest.java
+++ b/itests/src/test/java/org/apache/karaf/itests/EnterpriseFeaturesTest.java
@@ -23,48 +23,118 @@ import org.ops4j.pax.exam.spi.reactors.PerMethod;
@ExamReactorStrategy(PerMethod.class)
public class EnterpriseFeaturesTest extends KarafTestSupport {
- protected void installAndAssertFeature(String feature) throws Exception {
- featuresService.installFeature(feature);
- assertFeatureInstalled(feature);
+ @Test
+ public void testTransactionFeatures() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING TRANSACTION 1.0.0 FEATURE =====");
+ installAndAssertFeature("transaction", "1.0.0");
+ System.out.println("");
+ System.out.println("===== TESTING TRANSACTION 1.0.1 FEATURE =====");
+ installAndAssertFeature("transaction", "1.0.1");
+ System.out.println("");
+ System.out.println("===== TESTING TRANSACTION 1.1.0 FEATURE =====");
+ installAndAssertFeature("transaction", "1.1.0");
}
@Test
- public void testTransactionFeature() throws Exception {
- installAndAssertFeature("transaction");
+ public void testConnectorFeatures() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING CONNECTOR 2.2.2 FEATURE =====");
+ installAndAssertFeature("connector", "2.2.2");
+ System.out.println("");
+ System.out.println("===== TESTING CONNECTOR 3.1.1 FEATURE =====");
+ installAndAssertFeature("connector", "3.1.1");
}
@Test
- public void testJpaFeature() throws Exception {
- installAndAssertFeature("jpa");
+ public void testJpaFeatures() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING JPA 1.0.1 FEATURE =====");
+ installAndAssertFeature("jpa", "1.0.1");
+ System.out.println("");
+ System.out.println("===== TESTING JPA 1.0.2 FEATURE =====");
+ installAndAssertFeature("jpa", "1.0.2");
}
@Test
- public void testOpenJpaFeature() throws Exception {
- installAndAssertFeature("openjpa");
+ public void testOpenJpaFeatures() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING OPENJPA 2.2.2 FEATURE =====");
+ installAndAssertFeature("openjpa", "2.2.2");
+ System.out.println("");
+ System.out.println("===== TESTING OPENJPA 2.3.0 FEATURE =====");
+ installAndAssertFeature("openjpa", "2.3.0");
}
@Test
- public void testHibernateFeature() throws Exception {
- installAndAssertFeature("hibernate");
+ public void testHibernateFeatures() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING HIBERNATE " + System.getProperty("hibernate3.version") + " FEATURE =====");
+ installAndAssertFeature("hibernate", System.getProperty("hibernate3.version"));
+ System.out.println("");
+ System.out.println("===== TESTING HIBERNATE " + System.getProperty("hibernate42.version") + " FEATURE =====");
+ installAndAssertFeature("hibernate", System.getProperty("hibernate42.version"));
+ System.out.println("");
+ System.out.println("===== TESTING HIBERNATE " + System.getProperty("hibernate43.version") + " FEATURE =====");
+ installAndAssertFeature("hibernate", System.getProperty("hibernate43.version"));
}
@Test
- public void testHibernateEnversFeature() throws Exception {
- installAndAssertFeature("hibernate-envers");
+ public void testHibernateEnversFeatures() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING HIBERNATE-ENVERS " + System.getProperty("hibernate42.version") + " FEATURE =====");
+ installAndAssertFeature("hibernate-envers", System.getProperty("hibernate42.version"));
+ System.out.println("");
+ System.out.println("===== TESTING HIBERNATE-ENVERS " + System.getProperty("hibernate43.version") + " FEATURE =====");
+ installAndAssertFeature("hibernate-envers", System.getProperty("hibernate43.version"));
}
@Test
public void testHibernateValidatorFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING HIBERNATE-VALIDATOR FEATURE =====");
installAndAssertFeature("hibernate-validator");
}
@Test
public void testJndiFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING JNDI FEATURE =====");
installAndAssertFeature("jndi");
}
@Test
+ public void testJdbcFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING JDBC FEATURE =====");
+ installAndAssertFeature("jdbc");
+ }
+
+ @Test
+ public void testJmsFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING JMS FEATURE =====");
+ installAndAssertFeature("jms");
+ }
+
+ @Test
+ public void testOpenwebbeansFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING OPENWEBBEANS FEATURE =====");
+ installAndAssertFeature("openwebbeans");
+ }
+
+ @Test
+ public void testWeldFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING WELD FEATURE =====");
+ installAndAssertFeature("weld");
+ }
+
+ @Test
public void testApplicationWithoutIsolationFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING APPLICATION-WITHOUT-ISOLATION FEATURE =====");
installAndAssertFeature("application-without-isolation");
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0b097321/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java b/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java
index c9321a5..c9fe6e2 100644
--- a/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java
+++ b/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java
@@ -59,9 +59,7 @@ import org.osgi.util.tracker.ServiceTracker;
import org.junit.Assert;
import static org.ops4j.pax.exam.CoreOptions.maven;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.*;
public class KarafTestSupport {
@@ -89,7 +87,14 @@ public class KarafTestSupport {
karafDistributionConfiguration().frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").versionAsInProject().type("tar.gz"))
.karafVersion(MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf")).name("Apache Karaf").unpackDirectory(new File("target/exam")),
keepRuntimeFolder(),
- logLevel(LogLevelOption.LogLevel.ERROR)};
+ logLevel(LogLevelOption.LogLevel.ERROR),
+ editConfigurationFilePut("etc/system.properties", "hibernate3.version", System.getProperty("hibernate3.version")),
+ editConfigurationFilePut("etc/system.properties", "hibernate42.version", System.getProperty("hibernate42.version")),
+ editConfigurationFilePut("etc/system.properties", "hibernate43.version", System.getProperty("hibernate43.version")),
+ editConfigurationFilePut("etc/system.properties", "spring31.version", System.getProperty("spring31.version")),
+ editConfigurationFilePut("etc/system.properties", "spring32.version", System.getProperty("spring32.version")),
+ editConfigurationFilePut("etc/system.properties", "spring40.version", System.getProperty("spring40.version"))
+ };
}
/**
@@ -307,33 +312,66 @@ public class KarafTestSupport {
}
Assert.fail("Feature " + featureName + " should be installed but is not");
}
+
+ public void assertFeatureInstalled(String featureName, String featureVersion) {
+ Feature[] features = featuresService.listInstalledFeatures();
+ for (Feature feature : features) {
+ if (featureName.equals(feature.getName()) && featureVersion.equals(feature.getVersion())) {
+ return;
+ }
+ }
+ Assert.fail("Feature " + featureName + "/" + featureVersion + " should be installed but is not");
+ }
protected void installAndAssertFeature(String feature) throws Exception {
featuresService.installFeature(feature);
assertFeatureInstalled(feature);
}
- protected void installAssertAndUninstallFeature(String... feature) throws Exception {
+ protected void installAndAssertFeature(String feature, String version) throws Exception {
+ featuresService.installFeature(feature, version);
+ assertFeatureInstalled(feature, version);
+ }
+
+ protected void installAssertAndUninstallFeature(String feature) throws Exception {
Set<Feature> featuresBefore = new HashSet<Feature>(Arrays.asList(featuresService.listInstalledFeatures()));
try {
- for (String curFeature : feature) {
- featuresService.installFeature(curFeature);
- assertFeatureInstalled(curFeature);
- }
- } finally {
- uninstallNewFeatures(featuresBefore);
- }
+ featuresService.installFeature(feature);
+ assertFeatureInstalled(feature);
+ } finally {
+ uninstallNewFeatures(featuresBefore);
+ }
+ }
+
+ protected void installAssertAndUninstallFeature(String feature, String version) throws Exception {
+ Set<Feature> featuresBefore = new HashSet<Feature>(Arrays.asList(featuresService.listInstalledFeatures()));
+ try {
+ featuresService.installFeature(feature, version);
+ assertFeatureInstalled(feature, version);
+ } finally {
+ uninstallNewFeatures(featuresBefore);
+ }
}
+ protected void installAssertAndUninstallFeatures(String... feature) throws Exception {
+ Set<Feature> featuresBefore = new HashSet<Feature>(Arrays.asList(featuresService.listInstalledFeatures()));
+ try {
+ for (String curFeature : feature) {
+ featuresService.installFeature(curFeature);
+ assertFeatureInstalled(curFeature);
+ }
+ } finally {
+ uninstallNewFeatures(featuresBefore);
+ }
+ }
/**
* The feature service does not uninstall feature dependencies when uninstalling a single feature.
* So we need to make sure we uninstall all features that were newly installed.
*
* @param featuresBefore
- * @throws Exception
*/
- protected void uninstallNewFeatures(Set<Feature> featuresBefore) throws Exception {
+ protected void uninstallNewFeatures(Set<Feature> featuresBefore) {
Feature[] features = featuresService.listInstalledFeatures();
for (Feature curFeature : features) {
if (!featuresBefore.contains(curFeature)) {
@@ -341,7 +379,7 @@ public class KarafTestSupport {
System.out.println("Uninstalling " + curFeature.getName());
featuresService.uninstallFeature(curFeature.getName(), curFeature.getVersion());
} catch (Exception e) {
- e.printStackTrace();
+ // e.printStackTrace();
}
}
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0b097321/itests/src/test/java/org/apache/karaf/itests/SpringFeaturesTest.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/karaf/itests/SpringFeaturesTest.java b/itests/src/test/java/org/apache/karaf/itests/SpringFeaturesTest.java
new file mode 100644
index 0000000..1e3d5ca
--- /dev/null
+++ b/itests/src/test/java/org/apache/karaf/itests/SpringFeaturesTest.java
@@ -0,0 +1,309 @@
+/*
+ * Licensed 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.
+ */
+package org.apache.karaf.itests;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerMethod;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerMethod.class)
+public class SpringFeaturesTest extends KarafTestSupport {
+
+ // Spring DM features
+
+ @Test
+ public void testSpringDmFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-DM FEATURE =====");
+ installAndAssertFeature("spring-dm");
+ }
+
+ @Test
+ public void testSpringDmWebFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-DM-WEB FEATURE =====");
+ installAndAssertFeature("spring-dm-web");
+ }
+
+ // Spring 3.1.x features
+
+ @Test
+ public void testSpring31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringAspects31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-ASPECTS "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-aspects", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringInstrument31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-INSTRUMENT "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-instrument", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringJdbc31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-JDBC "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-jdbc", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringJms31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-JMS "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-jms", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringStruts31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-STRUTS "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-struts", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringTest31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-TEST "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-test", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringOrm31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-ORM "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-orm", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringOxm31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-OXM "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-oxm", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringTx31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-TX "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-tx", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringWeb31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-WEB "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-web", System.getProperty("spring31.version"));
+ }
+
+ @Test
+ public void testSpringWebPortlet31Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-WEB-PORTLET "+ System.getProperty("spring31.version") + " FEATURE =====");
+ installAndAssertFeature("spring-web-portlet", System.getProperty("spring31.version"));
+ }
+
+ // Spring 3.2.x features
+
+ @Test
+ public void testSpring32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringAspects32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-ASPECTS "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-aspects", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringInstrument32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-INSTRUMENT "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-instrument", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringJdbc32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-JDBC "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-jdbc", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringJms32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-JMS "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-jms", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringStruts32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-STRUTS "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-struts", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringTest32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-TEST "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-test", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringOrm32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-ORM "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-orm", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringOxm32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-OXM "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-oxm", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringTx32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-TX "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-tx", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringWeb32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-WEB "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-web", System.getProperty("spring32.version"));
+ }
+
+ @Test
+ public void testSpringWebPortlet32Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-WEB-PORTLET "+ System.getProperty("spring32.version") + " FEATURE =====");
+ installAndAssertFeature("spring-web-portlet", System.getProperty("spring32.version"));
+ }
+
+ // Spring 4.0.x features
+
+ @Test
+ public void testSpring40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringAspects40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-ASPECTS "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-aspects", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringInstrument40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-INSTRUMENT "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-instrument", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringJdbc40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-JDBC "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-jdbc", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringJms40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-JMS "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-jms", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringTest40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-TEST "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-test", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringOrm40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-ORM "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-orm", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringOxm40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-OXM "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-oxm", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringTx40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-TX "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-tx", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringWeb40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-WEB "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-web", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringWebPortlet40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-WEB-PORTLET "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-web-portlet", System.getProperty("spring40.version"));
+ }
+
+ @Test
+ public void testSpringWebsocket40Feature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-WEBSOCKET "+ System.getProperty("spring40.version") + " FEATURE =====");
+ installAndAssertFeature("spring-websocket", System.getProperty("spring40.version"));
+ }
+
+ // Spring security feature
+
+ @Test
+ public void testSpringSecurityFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SPRING-SECURITY FEATURE =====");
+ installAndAssertFeature("spring-security");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0b097321/itests/src/test/java/org/apache/karaf/itests/StandardFeaturesTest.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/karaf/itests/StandardFeaturesTest.java b/itests/src/test/java/org/apache/karaf/itests/StandardFeaturesTest.java
index 68d23e4..f7ef45a 100644
--- a/itests/src/test/java/org/apache/karaf/itests/StandardFeaturesTest.java
+++ b/itests/src/test/java/org/apache/karaf/itests/StandardFeaturesTest.java
@@ -25,130 +25,96 @@ public class StandardFeaturesTest extends KarafTestSupport {
@Test
public void testBootFeatures() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING BOOT FEATURES =====");
+ assertFeatureInstalled("karaf-framework");
+ assertFeatureInstalled("shell");
+ assertFeatureInstalled("features");
+ assertFeatureInstalled("service-security");
+ assertFeatureInstalled("admin");
assertFeatureInstalled("config");
assertFeatureInstalled("ssh");
assertFeatureInstalled("management");
assertFeatureInstalled("kar");
- }
-
- protected void installAndAssertFeature(String feature) throws Exception {
- featuresService.installFeature(feature);
- assertFeatureInstalled(feature);
- }
-
- @Test
- public void testSpringFeature() throws Exception {
- installAndAssertFeature("spring");
- }
-
- @Test
- public void testSpringAspectsFeature() throws Exception {
- installAndAssertFeature("spring-aspects");
- }
-
- @Test
- public void testSpringDmFeature() throws Exception {
- installAndAssertFeature("spring-dm");
- }
-
- @Test
- public void testSpringDmWebFeature() throws Exception {
- installAndAssertFeature("spring-dm-web");
- }
-
- @Test
- public void testSpringInstrumentFeature() throws Exception {
- installAndAssertFeature("spring-instrument");
- }
-
- @Test
- public void testSpringJdbcFeature() throws Exception {
- installAndAssertFeature("spring-jdbc");
- }
-
- @Test
- public void testSpringJmsFeature() throws Exception {
- installAndAssertFeature("spring-jms");
- }
-
- @Test
- public void testSpringStrutsFeature() throws Exception {
- installAndAssertFeature("spring-struts");
- }
-
- @Test
- public void testSpringTestFeature() throws Exception {
- installAndAssertFeature("spring-test");
- }
-
- @Test
- public void testSpringOrmFeature() throws Exception {
- installAndAssertFeature("spring-orm");
- }
-
- @Test
- public void testSpringOxmFeature() throws Exception {
- installAndAssertFeature("spring-oxm");
- }
-
- @Test
- public void testSpringTxFeature() throws Exception {
- installAndAssertFeature("spring-tx");
- }
-
- @Test
- public void testSpringWebFeature() throws Exception {
- installAndAssertFeature("spring-web");
- }
-
- @Test
- public void testSpringWebPortletFeature() throws Exception {
- installAndAssertFeature("spring-web-portlet");
+ assertFeatureInstalled("deployer");
+ assertFeatureInstalled("diagnostic");
}
@Test
public void testWrapperFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING WRAPPER FEATURE =====");
installAndAssertFeature("wrapper");
}
@Test
public void testObrFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING OBR FEATURE =====");
installAndAssertFeature("obr");
}
@Test
public void testJettyFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING JETTY FEATURE =====");
installAndAssertFeature("jetty");
}
@Test
public void testHttpFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING HTTP FEATURE =====");
installAndAssertFeature("http");
}
@Test
public void testHttpWhiteboardFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING HTTP-WHITEBOARD FEATURE =====");
installAndAssertFeature("http-whiteboard");
}
@Test
public void testWarFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING WAR FEATURE =====");
installAndAssertFeature("war");
}
@Test
public void testWebconsoleFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING WEBCONSOLE FEATURE =====");
installAndAssertFeature("webconsole");
}
@Test
public void testEventadminFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING EVENTADMIN FEATURE =====");
installAndAssertFeature("eventadmin");
}
@Test
public void testJasyptEncryptionFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING JASYPT-ENCRYPTION FEATURE =====");
installAndAssertFeature("jasypt-encryption");
}
+ @Test
+ public void testBlueprintWebFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING BLUEPRINT-WEB FEATURE =====");
+ installAndAssertFeature("blueprint-web");
+ }
+
+ @Test
+ public void testScrFeature() throws Exception {
+ System.out.println("");
+ System.out.println("===== TESTING SCR FEATURE =====");
+ installAndAssertFeature("scr");
+ }
+
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0b097321/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7346f36..cb54fdd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -214,8 +214,6 @@
<slf4j.version>1.7.7</slf4j.version>
<spring.osgi.version>1.2.1</spring.osgi.version>
- <spring2.version>2.5.6.SEC03</spring2.version>
- <spring30.version>3.0.7.RELEASE</spring30.version>
<spring31.version>3.1.4.RELEASE</spring31.version>
<spring32.version>3.2.9.RELEASE_1</spring32.version>
<spring40.version>4.0.5.RELEASE_1</spring40.version>
@@ -709,7 +707,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
- <version>${spring30.version}</version>
+ <version>${spring31.version}</version>
<exclusions>
<exclusion>
<groupId>org.aopalliance</groupId>
@@ -720,22 +718,22 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
- <version>${spring30.version}</version>
+ <version>${spring31.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
- <version>${spring30.version}</version>
+ <version>${spring31.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
- <version>${spring30.version}</version>
+ <version>${spring31.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
- <version>${spring30.version}</version>
+ <version>${spring31.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.osgi</groupId>