Bug 541638 - Increase default value for osgi.module.lock.timeout
Increased default timeout fro 5 to 30 seconds.
Change-Id: I228f94ba6d8f915b66ca5f4e12baab0ba7f55ef0
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/thread.locktest/thread/locktest/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/thread.locktest/thread/locktest/Activator.java
index bd62060..6970f0e 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/thread.locktest/thread/locktest/Activator.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/thread.locktest/thread/locktest/Activator.java
@@ -14,7 +14,9 @@
package thread.locktest;
import org.eclipse.osgi.tests.bundles.AbstractBundleTests;
-import org.osgi.framework.*;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
public class Activator implements BundleActivator, Runnable {
@@ -23,7 +25,7 @@
System.out.println("about to start thread");
thread.start();
System.out.println("about to join the thread");
- thread.join(10000);
+ thread.join(40000);
System.out.println("after joining thread");
AbstractBundleTests.simpleResults.addEvent(new BundleEvent(BundleEvent.STARTED, context.getBundle()));
}
@@ -38,7 +40,7 @@
new Class1();
long totalTime = System.currentTimeMillis() - startTime;
System.out.println("loaded Class1 " + totalTime);
- if (totalTime < 10000)
+ if (totalTime < 40000)
AbstractBundleTests.simpleResults.addEvent(new Long(5000));
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainer.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainer.java
index 1372e0d..89420d8 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainer.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleContainer.java
@@ -141,7 +141,7 @@
this.moduleDatabase = moduledataBase;
this.frameworkWiring = new ContainerWiring();
this.frameworkStartLevel = new ContainerStartLevel();
- long tempModuleLockTimeout = 5;
+ long tempModuleLockTimeout = 30;
String moduleLockTimeoutProp = adaptor.getProperty(EquinoxConfiguration.PROP_MODULE_LOCK_TIMEOUT);
if (moduleLockTimeoutProp != null) {
try {
@@ -151,7 +151,7 @@
tempModuleLockTimeout = 1;
}
} catch (NumberFormatException e) {
- // will default to 5
+ // will default to 30
}
}
this.moduleLockTimeout = tempModuleLockTimeout;