Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-04-13 14:13:16 -0400
committerSusan Franklin2010-04-13 14:13:16 -0400
commitc61987658f5cf37f2aeb8d2af65fb0c203f023e7 (patch)
tree23de1fe7861c5a0ffaaf4ff464144bc065aa607d /bundles/org.eclipse.equinox.p2.tests.ui
parentde86929d011128377a34f297b3a30c0de18a7bbf (diff)
downloadrt.equinox.p2-c61987658f5cf37f2aeb8d2af65fb0c203f023e7.tar.gz
rt.equinox.p2-c61987658f5cf37f2aeb8d2af65fb0c203f023e7.tar.xz
rt.equinox.p2-c61987658f5cf37f2aeb8d2af65fb0c203f023e7.zip
Bug 290858 - [ui] Checking for updates from the about dialog blocks the UI
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests.ui')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/AllTests.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdatePlanning.java (renamed from bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/UpdatePlanning.java)22
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/AllTests.java25
6 files changed, 23 insertions, 33 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
index 6c1f3d207..af2a3c342 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
@@ -20,4 +20,5 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.100",
org.eclipse.equinox.p2.tests;bundle-version="1.2.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.eclipse.equinox.internal.p2.ui.sdk,
- org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)"
+ org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.internal.p2.operations
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java
index 98ff2020f..3bf03d037 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java
@@ -25,7 +25,6 @@ public class AutomatedTests extends TestCase {
suite.addTest(org.eclipse.equinox.p2.tests.ui.dialogs.AllTests.suite());
suite.addTest(org.eclipse.equinox.p2.tests.ui.misc.AllTests.suite());
suite.addTest(org.eclipse.equinox.p2.tests.ui.repohandling.AllTests.suite());
- suite.addTest(org.eclipse.equinox.p2.tests.ui.planning.AllTests.suite());
return suite;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java
index 0b37fae3d..e6ea8a3e9 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.ui.dialogs;
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
import java.util.ArrayList;
import org.eclipse.equinox.internal.p2.metadata.License;
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.internal.p2.ui.dialogs.*;
import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.operations.ProfileModificationJob;
import org.eclipse.equinox.p2.operations.UpdateOperation;
import org.eclipse.jface.dialogs.IDialogConstants;
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/AllTests.java
index 331cf99a5..6c7724ebf 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/AllTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/AllTests.java
@@ -21,6 +21,7 @@ public class AllTests extends TestCase {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTestSuite(SizingTest.class);
suite.addTestSuite(InstallerPlanTest.class);
+ suite.addTestSuite(UpdatePlanning.class);
return suite;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/UpdatePlanning.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdatePlanning.java
index b7f8ebfc2..5b39df82e 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/UpdatePlanning.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdatePlanning.java
@@ -8,15 +8,15 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.planning;
+package org.eclipse.equinox.p2.tests.ui.operations;
import java.util.ArrayList;
import java.util.HashSet;
+import org.eclipse.equinox.internal.p2.operations.SearchForUpdatesResolutionJob;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.operations.Update;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.operations.*;
import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
@@ -181,6 +181,22 @@ public class UpdatePlanning extends AbstractProvisioningUITest {
op.setSelectedUpdates(new Update[] {updates[0]});
op.resolveModal(getMonitor());
assertEquals("1.1", 1, op.getSelectedUpdates().length);
+ }
+
+ // bug 290858
+ public void testSearchForUpdatesInJob() throws ProvisionException {
+ createTestMetdataRepository(new IInstallableUnit[] {a1, a130, b1, b12});
+ install(a1, true, false);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(a1);
+ iusInvolved.add(b1);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
+ ProvisioningJob job = op.getResolveJob(getMonitor());
+ assertTrue("1.0", job instanceof SearchForUpdatesResolutionJob);
+ // getting the job should not compute the request.
+ assertNull("1.1", ((SearchForUpdatesResolutionJob) job).getProfileChangeRequest());
+ job.runModal(getMonitor());
+ assertNotNull("1.2", ((SearchForUpdatesResolutionJob) job).getProfileChangeRequest());
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/AllTests.java
deleted file mode 100644
index 5b8bc2624..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/AllTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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.p2.tests.ui.planning;
-
-import junit.framework.*;
-
-/**
- * Performs all UI action tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(UpdatePlanning.class);
- return suite;
- }
-}

Back to the top