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 2019/05/20 05:23:04 UTC

[karaf] branch master updated: [KARAF-6287] Downgrade to Equinox 3.12.100 and adding a SCR itest with Equinox

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new a91390d  [KARAF-6287] Downgrade to Equinox 3.12.100 and adding a SCR itest with Equinox
     new e54b15e  Merge pull request #846 from jbonofre/KARAF-6287
a91390d is described below

commit a91390d30ee0d57bebe43d715ba16e36fab9e33c
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Sun May 19 18:51:21 2019 +0200

    [KARAF-6287] Downgrade to Equinox 3.12.100 and adding a SCR itest with Equinox
---
 .../itests/examples/ScrExampleWithEquinoxTest.java | 59 ++++++++++++++++++++++
 pom.xml                                            |  2 +-
 2 files changed, 60 insertions(+), 1 deletion(-)

diff --git a/itests/test/src/test/java/org/apache/karaf/itests/examples/ScrExampleWithEquinoxTest.java b/itests/test/src/test/java/org/apache/karaf/itests/examples/ScrExampleWithEquinoxTest.java
new file mode 100644
index 0000000..669633e
--- /dev/null
+++ b/itests/test/src/test/java/org/apache/karaf/itests/examples/ScrExampleWithEquinoxTest.java
@@ -0,0 +1,59 @@
+/*
+ *  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.
+ */
+package org.apache.karaf.itests.examples;
+
+import org.apache.karaf.itests.KarafTestSupport;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.karaf.options.KarafDistributionOption;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class ScrExampleWithEquinoxTest extends KarafTestSupport {
+
+    @Configuration
+    public Option[] config() {
+        List<Option> config = new LinkedList<>(Arrays.asList(super.config()));
+        config.add(KarafDistributionOption.editConfigurationFilePut("etc/config.properties", "karaf.framework", "equinox"));
+        return config.toArray(new Option[config.size()]);
+    }
+
+    @Test
+    public void test() throws Exception {
+        addFeaturesRepository("mvn:org.apache.karaf.examples/karaf-scr-example-features/" + System.getProperty("karaf.version") + "/xml");
+
+        installAndAssertFeature("karaf-scr-example-client");
+
+        String output = executeCommand("scr:info BookingServiceMemoryImpl");
+        System.out.println(output);
+        assertContains("\"state\":32", output);
+
+        output = executeCommand("scr:info ConsoleClient");
+        System.out.println(output);
+        assertContains("\"state\":32", output);
+    }
+
+}
diff --git a/pom.xml b/pom.xml
index b2f376c..507e3d6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -188,7 +188,7 @@
         <objenesis.version>2.6</objenesis.version>
         <equinox.groupId>org.eclipse.platform</equinox.groupId>
         <equinox.artifactId>org.eclipse.osgi</equinox.artifactId>
-        <equinox.version>3.13.300</equinox.version>
+        <equinox.version>3.12.100</equinox.version>
         <bndlib.version>2.4.0</bndlib.version>
         <equinox.region.version>1.2.101.v20150831-1342</equinox.region.version>
         <equinox.coordinator.version>1.1.0.v20120522-1841</equinox.coordinator.version>