Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2014-01-07 15:15:38 +0000
committerThomas Watson2014-01-07 15:15:38 +0000
commit6b2c4d91b61b9ddf06f217787f9d07fd0ac7ad75 (patch)
treefbcc00d1aab2d147cbe11bc35327e79a648f8b0b /bundles/org.eclipse.osgi.tests
parent0d4a58ba889424c4e6aba492a5e178e1308cca65 (diff)
downloadrt.equinox.framework-6b2c4d91b61b9ddf06f217787f9d07fd0ac7ad75.tar.gz
rt.equinox.framework-6b2c4d91b61b9ddf06f217787f9d07fd0ac7ad75.tar.xz
rt.equinox.framework-6b2c4d91b61b9ddf06f217787f9d07fd0ac7ad75.zip
Bug 423146 - 3 failures in StorageHookTests
Diffstat (limited to 'bundles/org.eclipse.osgi.tests')
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/AbstractFrameworkHookTests.java24
1 files changed, 18 insertions, 6 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/AbstractFrameworkHookTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/AbstractFrameworkHookTests.java
index d2fca7e07..543330704 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/AbstractFrameworkHookTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/AbstractFrameworkHookTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -108,18 +108,30 @@ public abstract class AbstractFrameworkHookTests extends CoreTest {
}
protected void stop(Framework framework) throws Exception {
- framework.stop();
- FrameworkEvent event = framework.waitForStop(5000);
- assertEquals("The framework was not stopped", FrameworkEvent.STOPPED, event.getType());
+ stop(framework, false);
}
protected void stopQuietly(Framework framework) {
if (framework == null)
return;
try {
- stop(framework);
+ stop(framework, true);
} catch (Exception e) {
- // Ignore.
+ // ignore;
+ }
+ }
+
+ private void stop(Framework framework, boolean quietly) throws Exception {
+ try {
+ framework.stop();
+ FrameworkEvent event = framework.waitForStop(10000);
+ if (!quietly) {
+ assertEquals("The framework was not stopped", FrameworkEvent.STOPPED, event.getType());
+ }
+ } catch (Exception e) {
+ if (!quietly) {
+ throw e;
+ }
}
}

Back to the top