Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2016-06-02 19:29:32 +0000
committerThomas Watson2017-06-16 12:38:08 +0000
commit0965ee422528b80cd11bb690f7d94559c54c0d16 (patch)
tree19240cb97a60192fb768f3254e418f52a98963ac /bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
parent943977005bfc2a3c04daca26822418310029133f (diff)
downloadrt.equinox.framework-0965ee422528b80cd11bb690f7d94559c54c0d16.tar.gz
rt.equinox.framework-0965ee422528b80cd11bb690f7d94559c54c0d16.tar.xz
rt.equinox.framework-0965ee422528b80cd11bb690f7d94559c54c0d16.zip
Bug 492825 - [osgi R7] Resolver specification updates for version 1.1
Add onCancel support Change-Id: I0e46d80bb47a044fa9d1087515b550fc2cf0773b Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java')
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
index 96b67023b..884901693 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
@@ -1800,12 +1800,14 @@ public class TestModuleContainer extends AbstractTest {
}
};
ExecutorService executor = new ThreadPoolExecutor(coreThreads, maxThreads, idleTimeout, TimeUnit.SECONDS, queue, threadFactory, rejectHandler);
+ ScheduledExecutorService timeoutExecutor = new ScheduledThreadPoolExecutor(1);
Map<String, String> configuration = new HashMap<String, String>();
configuration.put(EquinoxConfiguration.PROP_RESOLVER_BATCH_TIMEOUT, "5000");
Map<String, String> debugOpts = Collections.emptyMap();
DummyContainerAdaptor adaptor = new DummyContainerAdaptor(new DummyCollisionHook(false), configuration, new DummyResolverHookFactory(), new DummyDebugOptions(debugOpts));
adaptor.setResolverExecutor(executor);
+ adaptor.setTimeoutExecutor(timeoutExecutor);
ModuleContainer container = adaptor.getContainer();
for (int i = 1; i <= 1000; i++) {
for (Map<String, String> manifest : getUsesTimeoutManifests("test" + i)) {
@@ -1818,6 +1820,7 @@ public class TestModuleContainer extends AbstractTest {
Assert.assertEquals("Wrong state of module: " + module, State.RESOLVED, module.getState());
}
executor.shutdown();
+ timeoutExecutor.shutdown();
System.gc();
System.gc();
System.gc();

Back to the top