You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by pi...@apache.org on 2010/12/30 08:50:24 UTC
svn commit: r1053817 - in
/karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests:
CoreTest.java FeaturesTest.java
Author: pieber
Date: Thu Dec 30 07:50:23 2010
New Revision: 1053817
URL: http://svn.apache.org/viewvc?rev=1053817&view=rev
Log:
[KARAF-329] adapted tests
Signed-off-by: Andreas Pieber <an...@gmail.com>
Modified:
karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/CoreTest.java
karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
Modified: karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/CoreTest.java
URL: http://svn.apache.org/viewvc/karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/CoreTest.java?rev=1053817&r1=1053816&r2=1053817&view=diff
==============================================================================
--- karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/CoreTest.java (original)
+++ karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/CoreTest.java Thu Dec 30 07:50:23 2010
@@ -16,35 +16,25 @@
*/
package org.apache.karaf.shell.itests;
-import java.io.InputStream;
-import java.util.List;
-import java.util.jar.Manifest;
+import static org.apache.karaf.testing.Helper.felixProvisionalApis;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.ops4j.pax.exam.CoreOptions.felix;
+import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
+import static org.ops4j.pax.exam.OptionUtils.combine;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
+import org.apache.felix.service.command.CommandProcessor;
+import org.apache.felix.service.command.CommandSession;
import org.apache.karaf.testing.AbstractIntegrationTest;
-import org.apache.karaf.testing.HeaderParser;
import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Customizer;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import org.osgi.framework.Bundle;
-import org.apache.felix.service.command.CommandProcessor;
-import org.apache.felix.service.command.CommandSession;
-import org.osgi.framework.Constants;
-
-import static org.apache.karaf.testing.Helper.felixProvisionalApis;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.felix;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
-import static org.ops4j.pax.exam.OptionUtils.combine;
-
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
-import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.modifyBundle;
@RunWith(JUnit4TestRunner.class)
public class CoreTest extends AbstractIntegrationTest {
@@ -123,7 +113,7 @@ public class CoreTest extends AbstractIn
// Default karaf environment
Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("TRACE")),
+ Helper.setLogLevel("TRACE")),
workingDirectory("target/paxrunner/core/"),
@@ -137,7 +127,7 @@ public class CoreTest extends AbstractIn
felixProvisionalApis()
);
- // Stop the shell log bundle
+ // Stop the shell log bundle
Helper.findMaven(options, "org.apache.karaf.shell", "org.apache.karaf.shell.log").noStart();
return options;
}
Modified: karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
URL: http://svn.apache.org/viewvc/karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java?rev=1053817&r1=1053816&r2=1053817&view=diff
==============================================================================
--- karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java (original)
+++ karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java Thu Dec 30 07:50:23 2010
@@ -16,35 +16,24 @@
*/
package org.apache.karaf.shell.itests;
-import java.io.InputStream;
-import java.util.List;
-import java.util.jar.Manifest;
+import static org.apache.karaf.testing.Helper.felixProvisionalApis;
+import static org.junit.Assert.assertNotNull;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.ops4j.pax.exam.CoreOptions.felix;
+import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
+import static org.ops4j.pax.exam.OptionUtils.combine;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
+import org.apache.felix.service.command.CommandProcessor;
+import org.apache.felix.service.command.CommandSession;
import org.apache.karaf.testing.AbstractIntegrationTest;
import org.apache.karaf.testing.Helper;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Customizer;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.osgi.framework.Constants;
import org.osgi.service.blueprint.container.BlueprintContainer;
-import org.apache.felix.service.command.CommandProcessor;
-import org.apache.felix.service.command.CommandSession;
-
-import static org.apache.karaf.testing.Helper.felixProvisionalApis;
-import static org.junit.Assert.assertNotNull;
-import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.CoreOptions.felix;
-import static org.ops4j.pax.exam.CoreOptions.maven;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
-import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
-import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.modifyBundle;
@RunWith(JUnit4TestRunner.class)
public class FeaturesTest extends AbstractIntegrationTest {
@@ -68,18 +57,15 @@ public class FeaturesTest extends Abstra
// Default karaf environment
Helper.getDefaultOptions(
// this is how you set the default log level when using pax logging (logProfile)
- systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG")),
+ Helper.setLogLevel("DEBUG")),
// add two features
- scanFeatures(
- maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("xml").classifier("features").versionAsInProject(),
- "obr", "wrapper"
- ),
+ Helper.loadKarafFeatures("obr", "wrapper"),
workingDirectory("target/paxrunner/features/"),
waitForFrameworkStartup(),
-
+
// Test on both equinox and felix
// TODO: pax-exam does not support the latest felix version :-(
// TODO: so we use the higher supported which should be the same