sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1767234 - in /sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it: BundleInstallBlackListTest.java OsgiInstallerTestBase.java
Date Mon, 31 Oct 2016 10:01:07 GMT
Author: cziegeler
Date: Mon Oct 31 10:01:07 2016
New Revision: 1767234

URL: http://svn.apache.org/viewvc?rev=1767234&view=rev
Log:
SLING-5779 : Packaged OSGi config intermittently do not get installed before bundle start

Modified:
    sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/BundleInstallBlackListTest.java
    sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java

Modified: sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/BundleInstallBlackListTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/BundleInstallBlackListTest.java?rev=1767234&r1=1767233&r2=1767234&view=diff
==============================================================================
--- sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/BundleInstallBlackListTest.java
(original)
+++ sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/BundleInstallBlackListTest.java
Mon Oct 31 10:01:07 2016
@@ -36,6 +36,11 @@ public class BundleInstallBlackListTest
 
     final String symbolicName = "osgi-installer-testbundle";
 
+    @Override
+    protected String requiredServices() {
+        return "";
+    }
+
     @org.ops4j.pax.exam.Configuration
     public Option[] config() {
         return defaultConfiguration();
@@ -152,18 +157,10 @@ public class BundleInstallBlackListTest
 
     private void updateInstallerBundle() throws BundleException {
         // wait a little bit for updating bundle
-        try {
-            Thread.sleep(2000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
+        sleep(2000);
         bundleContext.getServiceReference(OsgiInstaller.class).getBundle().update();
         // wait a little bit after updating bundle
-        try {
-            Thread.sleep(2000);
-        } catch (InterruptedException e) {
-            // ignore
-        }
+        sleep(2000);
         setupInstaller();
     }
 

Modified: sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java?rev=1767234&r1=1767233&r2=1767234&view=diff
==============================================================================
--- sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java
(original)
+++ sling/trunk/installer/it/src/test/java/org/apache/sling/installer/it/OsgiInstallerTestBase.java
Mon Oct 31 10:01:07 2016
@@ -19,6 +19,7 @@ package org.apache.sling.installer.it;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
+import static org.ops4j.pax.exam.CoreOptions.frameworkProperty;
 import static org.ops4j.pax.exam.CoreOptions.junitBundles;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.options;
@@ -475,6 +476,10 @@ public class OsgiInstallerTestBase imple
     	log.log(level, msg);
     }
 
+    protected String requiredServices() {
+        return "resourcetransformer:org.osgi.service.cm,installtaskfactory:org.osgi.service.cm";
+    }
+
     protected Option[] defaultConfiguration() {
     	String vmOpt = "-Dosgi.installer.testing";
 
@@ -503,6 +508,7 @@ public class OsgiInstallerTestBase imple
                         systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepo)
                 ),
                 systemProperty( "org.ops4j.pax.logging.DefaultServiceLog.level" ).value(paxDebugLevel),
+                frameworkProperty("sling.installer.requiredservices").value(requiredServices()),
                 provision(
                         mavenBundle("org.apache.sling", "org.apache.sling.commons.log", "4.0.6"),
                         mavenBundle("org.apache.sling", "org.apache.sling.commons.logservice",
"1.0.6"),



Mime
View raw message