Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java')
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java54
1 files changed, 0 insertions, 54 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java
deleted file mode 100644
index e10e2c929..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.osgi.framework.*;
-
-public class TestRunningInstance extends AbstractFwkAdminTest {
-
- public TestRunningInstance(String name) {
- super(name);
- }
-
- public void testRunningInstance() throws BundleException {
- //TODO Commented out due to NPE failure on Windows on test machines only
- if (Platform.OS_WIN32.equals(Platform.getOS()))
- return;
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator m = fwkAdmin.getRunningManipulator();
- BundleInfo[] infos = m.getConfigData().getBundles();
-
- Bundle[] bundles = Activator.getContext().getBundles();
-
- assertEquals(bundles.length, infos.length);
- for (int i = 0; i < bundles.length; i++) {
- boolean found = false;
- for (int j = 0; j < infos.length && found == false; j++) {
- found = same(infos[j], bundles[i]);
- }
- if (found == false) {
- fail("Can't find: " + bundles[i]);
- }
- }
- }
-
- private boolean same(BundleInfo info, Bundle bundle) {
- if (info.getSymbolicName().equals(bundle.getSymbolicName())) {
- if (new Version((String) bundle.getHeaders().get(Constants.BUNDLE_VERSION)).equals(new Version(info.getVersion())))
- return true;
- }
- return false;
- }
-}

Back to the top