Skip to content

Only select compatible providers during collection of JUnit requirements#2037

Closed
laeubi wants to merge 2 commits intoeclipse-pde:masterfrom
laeubi:only_select_compatible
Closed

Only select compatible providers during collection of JUnit requirements#2037
laeubi wants to merge 2 commits intoeclipse-pde:masterfrom
laeubi:only_select_compatible

Conversation

@laeubi
Copy link
Contributor

@laeubi laeubi commented Oct 22, 2025

Currently PDE searches JUnit requirements primary by its id and adds them unconditionally. This does not work well when there are multiple options and versions.

This now changes the selection process in the following way:

  1. Select all required junit runtimes
  2. Compute their dependencies and add them if required
  3. Among all possible options select those engines and launchers that actually match a requirement in this set
  4. if none of the matching are already selected, use the highest matching version

FYI @trancexpress

Currently PDE searches JUnit requirements primary by its id and adds
them unconditionally. This does not work well when there are multiple
options and versions.

This now changes the selection process in the following way:

1) Select all required junit runtimes
2) Compute their dependencies and add them if required
3) Among all possible options select those engines and launchers that
actually match a requirement in this set
4) if none of the matching are already selected, use the highest
matching version
@eclipse-pde-bot
Copy link
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

features/org.eclipse.pde.unittest.junit-feature/feature.xml
ui/org.eclipse.pde.unittest.junit/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 85b9eaad65951d4217a4ae3daee47005397c24a1 Mon Sep 17 00:00:00 2001
From: Eclipse PDE Bot <pde-bot@eclipse.org>
Date: Wed, 22 Oct 2025 09:52:06 +0000
Subject: [PATCH] Version bump(s) for 4.38 stream


diff --git a/features/org.eclipse.pde.unittest.junit-feature/feature.xml b/features/org.eclipse.pde.unittest.junit-feature/feature.xml
index 526088e3ee..175b86fb6b 100644
--- a/features/org.eclipse.pde.unittest.junit-feature/feature.xml
+++ b/features/org.eclipse.pde.unittest.junit-feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.pde.unittest.junit"
       label="%featureName"
-      version="1.0.1100.qualifier"
+      version="1.0.1200.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
diff --git a/ui/org.eclipse.pde.unittest.junit/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.unittest.junit/META-INF/MANIFEST.MF
index 149fe2a092..59f7d8b1d7 100644
--- a/ui/org.eclipse.pde.unittest.junit/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.unittest.junit/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.pde.unittest.junit
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.unittest.junit;singleton:=true
-Bundle-Version: 1.2.100.qualifier
+Bundle-Version: 1.2.200.qualifier
 Bundle-Activator: org.eclipse.pde.unittest.junit.JUnitPluginTestPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
-- 
2.51.0

Further information are available in Common Build Issues - Missing version increments.

Copy link
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this I also have to admit that I fail to the exact difference to #2013. At the same time this changes many things differently and will conflict with #2013.
And as the latter is hopfully is ready soon, my suggestion is to not delay #2013 further and keep the attribution with the author of it. If this contains changes that are eventually missing from the other PR, they still can be applied afterwards in this or a new PR.

@github-actions
Copy link

Test Results

  571 files   -   200    571 suites   - 200   45m 42s ⏱️ - 24m 34s
3 524 tests  -    85  3 495 ✅  -    62  28 💤  - 24  1 ❌ +1 
7 565 runs   - 3 262  7 488 ✅  - 3 182  76 💤  - 81  1 ❌ +1 

For more details on these failures, see this check.

Results for commit d077f2f. ± Comparison against base commit 9851080.

This pull request removes 85 tests.
JUnitRuntimeTests org.eclipse.pde.junit.runtime.tests.JUnit5SuiteExecutionTest ‑ executePackage
JUnitRuntimeTests org.eclipse.pde.junit.runtime.tests.JUnit5SuiteExecutionTest ‑ executeProject
JUnitRuntimeTests org.eclipse.pde.junit.runtime.tests.JUnit5SuiteExecutionTest ‑ executeSuite
JUnitRuntimeTests org.eclipse.pde.junit.runtime.tests.JUnitExecutionTest ‑ executeMethod[JUnit4 (JUnitPlatform) Fragment]
JUnitRuntimeTests org.eclipse.pde.junit.runtime.tests.JUnitExecutionTest ‑ executeMethod[JUnit4 (JUnitPlatform)]
JUnitRuntimeTests org.eclipse.pde.junit.runtime.tests.JUnitExecutionTest ‑ executeMethod[JUnit4 Fragment]
JUnitRuntimeTests org.eclipse.pde.junit.runtime.tests.JUnitExecutionTest ‑ executeMethod[JUnit4]
JUnitRuntimeTests org.eclipse.pde.junit.runtime.tests.JUnitExecutionTest ‑ executeMethod[JUnit5 Fragment]
JUnitRuntimeTests org.eclipse.pde.junit.runtime.tests.JUnitExecutionTest ‑ executeMethod[JUnit5]
JUnitRuntimeTests org.eclipse.pde.junit.runtime.tests.JUnitExecutionTest ‑ executeMethod[Java 11 bundle with module limit]
…

@laeubi
Copy link
Contributor Author

laeubi commented Oct 23, 2025

@HannesWell

  1. I completely wrote this on my own so did not based it on some other PR to not being biased.
  2. The main difference here is that I tried to avoid using strings / bundle ids to collect items that later need to be mapped again to models/versions, but I'll check the other PR again it seem to change much more, so maybe we jsut need to split up things.

@laeubi laeubi marked this pull request as draft October 23, 2025 07:26
@laeubi
Copy link
Contributor Author

laeubi commented Oct 23, 2025

Changed to draft here, we should first complete the other PR before possibly improvements can be applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants