You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by cs...@apache.org on 2017/05/18 12:46:35 UTC
[1/2] karaf git commit: Deploy hamcrest and awaitility and fix
ConfigTest
Repository: karaf
Updated Branches:
refs/heads/master f03f84587 -> 0be7b13b1
Deploy hamcrest and awaitility and fix ConfigTest
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/0be7b13b
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/0be7b13b
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/0be7b13b
Branch: refs/heads/master
Commit: 0be7b13b1e978bcdaa53273d248006ec0b9f686c
Parents: 4b42986
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Thu May 18 14:25:25 2017 +0200
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Thu May 18 14:46:21 2017 +0200
----------------------------------------------------------------------
itests/pom.xml | 6 ++++++
itests/src/test/java/org/apache/karaf/itests/ConfigTest.java | 8 ++++----
itests/src/test/java/org/apache/karaf/itests/JmsTest.java | 4 +---
.../test/java/org/apache/karaf/itests/KarafTestSupport.java | 4 ++++
4 files changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/0be7b13b/itests/pom.xml
----------------------------------------------------------------------
diff --git a/itests/pom.xml b/itests/pom.xml
index 6f16ab9..d624d2c 100644
--- a/itests/pom.xml
+++ b/itests/pom.xml
@@ -117,6 +117,12 @@
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.hamcrest</artifactId>
+ <version>1.3_1</version>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
http://git-wip-us.apache.org/repos/asf/karaf/blob/0be7b13b/itests/src/test/java/org/apache/karaf/itests/ConfigTest.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/karaf/itests/ConfigTest.java b/itests/src/test/java/org/apache/karaf/itests/ConfigTest.java
index 39bc83e..4b24d60 100644
--- a/itests/src/test/java/org/apache/karaf/itests/ConfigTest.java
+++ b/itests/src/test/java/org/apache/karaf/itests/ConfigTest.java
@@ -13,10 +13,10 @@
*/
package org.apache.karaf.itests;
-import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.hasItem;
+import static org.hamcrest.Matchers.hasKey;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
import java.lang.management.ManagementFactory;
import java.util.List;
@@ -51,10 +51,10 @@ public class ConfigTest extends KarafTestSupport {
MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
ObjectName name = new ObjectName("org.apache.karaf:type=config,name=root");
List<String> configs = (List<String>) mbeanServer.getAttribute(name, "Configs");
- assertThat(configs, contains("org.apache.karaf.features"));
+ assertThat(configs, hasItem("org.apache.karaf.features"));
Map<String, String> properties = (Map<String, String>) mbeanServer
.invoke(name, "listProperties", new Object[]{"org.apache.karaf.features"}, new String[]{"java.lang.String"});
- assertTrue(properties.keySet().size() > 0);
+ assertThat(properties, hasKey("featuresRepositories"));
}
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0be7b13b/itests/src/test/java/org/apache/karaf/itests/JmsTest.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/karaf/itests/JmsTest.java b/itests/src/test/java/org/apache/karaf/itests/JmsTest.java
index 7d51bde..f0068de 100644
--- a/itests/src/test/java/org/apache/karaf/itests/JmsTest.java
+++ b/itests/src/test/java/org/apache/karaf/itests/JmsTest.java
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.composite;
import static org.ops4j.pax.exam.CoreOptions.maven;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
import java.io.IOException;
@@ -65,8 +64,7 @@ public class JmsTest extends KarafTestSupport {
return new Option[] //
{
composite(super.config()), //
- features(activeMqUrl, "jms", "activemq-broker-noweb"),
- mavenBundle().groupId("org.awaitility").artifactId("awaitility").versionAsInProject()
+ features(activeMqUrl, "jms", "activemq-broker-noweb")
};
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/0be7b13b/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 e630f4a..009431e 100644
--- a/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java
+++ b/itests/src/test/java/org/apache/karaf/itests/KarafTestSupport.java
@@ -15,6 +15,7 @@ package org.apache.karaf.itests;
import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureSecurity;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
@@ -66,6 +67,7 @@ import org.junit.runner.Description;
import org.junit.runners.model.Statement;
import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.ProbeBuilder;
import org.ops4j.pax.exam.RerunTestException;
@@ -195,6 +197,8 @@ public class KarafTestSupport {
configureSecurity().disableKarafMBeanServerBuilder(),
keepRuntimeFolder(),
logLevel(LogLevel.INFO),
+ mavenBundle().groupId("org.awaitility").artifactId("awaitility").versionAsInProject(),
+ mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(),
replaceConfigurationFile("etc/org.ops4j.pax.logging.cfg", getConfigFile("/etc/org.ops4j.pax.logging.cfg")),
editConfigurationFilePut("etc/org.apache.karaf.features.cfg", "updateSnapshots", "none"),
editConfigurationFilePut("etc/org.ops4j.pax.web.cfg", "org.osgi.service.http.port", httpPort),
[2/2] karaf git commit: Update to pax exam 4.11
Posted by cs...@apache.org.
Update to pax exam 4.11
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/4b429861
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/4b429861
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/4b429861
Branch: refs/heads/master
Commit: 4b429861754d3334c203bd31c7bbd9d4be576e57
Parents: f03f845
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Thu May 18 14:23:37 2017 +0200
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Thu May 18 14:46:21 2017 +0200
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/4b429861/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a7d00ab..f8182a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -260,7 +260,7 @@
<org.json.version>20150729</org.json.version>
<pax.cdi.version>1.0.0.RC2</pax.cdi.version>
- <pax.exam.version>4.10.0</pax.exam.version>
+ <pax.exam.version>4.11.0</pax.exam.version>
<pax.logging.version>1.10.0</pax.logging.version>
<pax.base.version>1.5.0</pax.base.version>
<pax.url.version>2.5.2</pax.url.version>