diff options
Diffstat (limited to 'bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java')
-rwxr-xr-x | bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java index 3d5225989..eb40f940e 100755 --- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java +++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java @@ -13,16 +13,10 @@ *******************************************************************************/ package org.eclipse.osgi.tests.bundles; -import java.io.*; -import java.util.HashMap; import java.util.Map; -import java.util.jar.*; import junit.framework.Test; import junit.framework.TestSuite; import org.eclipse.osgi.launch.Equinox; -import org.eclipse.osgi.tests.OSGiTestsActivator; -import org.osgi.framework.BundleException; -import org.osgi.framework.Constants; /* * The framework must persist data according to the value of the @@ -35,35 +29,6 @@ import org.osgi.framework.Constants; * */ public class PersistedBundleTests extends AbstractBundleTests { - static class BundleBuilder { - static class BundleManifestBuilder { - private final Manifest manifest = new Manifest(); - - public Manifest build() { - manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); - return manifest; - } - - public BundleManifestBuilder symbolicName(String value) { - manifest.getMainAttributes().putValue(Constants.BUNDLE_SYMBOLICNAME, value); - return this; - } - } - - private final BundleManifestBuilder manifestBuilder = new BundleManifestBuilder(); - - public InputStream build() throws IOException { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - JarOutputStream jos = new JarOutputStream(baos, manifestBuilder.build()); - jos.close(); - return new ByteArrayInputStream(baos.toByteArray()); - } - - public BundleBuilder symbolicName(String value) { - manifestBuilder.symbolicName(value); - return this; - } - } private static final String ECLIPSE_STATESAVEDELAYINTERVAL = "eclipse.stateSaveDelayInterval"; @@ -185,26 +150,4 @@ public class PersistedBundleTests extends AbstractBundleTests { } } - private Map<String, Object> createConfiguration() { - File file = OSGiTestsActivator.getContext().getDataFile(getName()); - Map<String, Object> result = new HashMap<String, Object>(); - result.put(Constants.FRAMEWORK_STORAGE, file.getAbsolutePath()); - return result; - } - - private void initAndStart(Equinox equinox) throws BundleException { - equinox.init(); - equinox.start(); - } - - private void stopQuietly(Equinox equinox) { - if (equinox == null) - return; - try { - equinox.stop(); - equinox.waitForStop(5000); - } catch (Exception e) { - // Ignore - } - } }
\ No newline at end of file |