diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/util/TargetPlatformUtil.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/util/TargetPlatformUtil.java index dba6174900a..cff3dc11a58 100644 --- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/util/TargetPlatformUtil.java +++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/util/TargetPlatformUtil.java @@ -111,6 +111,10 @@ public static void loadAndSetTarget(ITargetDefinition target) throws Interrupted if (!result.isOK()) { throw new AssertionError(result.getMessage(), result.getException()); } + + // Wait for any follow-up jobs (e.g., PluginRegistry updates) to complete + // This ensures that the PluginRegistry is fully synchronized with the new target + TestUtils.waitForJobs("loadAndSetTarget", 100, 10000); } private static List addRunningPlatformBundles(Collection bundleContainers,