From 848aad4b8a8f88c3cd1611eeb31c76dbf409c07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dinis=20Ferreira?= Date: Fri, 1 May 2026 00:26:05 +0200 Subject: [PATCH] chore: drop JUnit 4 from target and bundle manifests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No DDK source still depends on JUnit 4. This commit drops org.junit and junit-vintage-engine from the ddk.target IUs and from Require-Bundle across 7 bundle manifests, removes stale Export-Package entries for already-deleted packages, and switches swtbot.eclipse.test.junit.feature.group to swtbot.junit5.feature.group. Two non-mechanical bits: xtext.test's manifest gains an explicit Require-Bundle on junit-platform-suite-engine — the runtime executor for @Suite/@SelectClasses, previously resolved transitively by luck, and the absence of which is what made the silent-zero possible. And com.avaloq.tools.ddk.test.core.MultipleTestProblems (the JUnit 4 implementation using MultipleFailureException) is deleted; its sole user CompoundStep switches to the existing jupiter/MultipleTestProblems which uses org.opentest4j.MultipleFailuresError. Verified locally: 357 tests, 0 failures, 0 errors, BUILD SUCCESS. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../META-INF/MANIFEST.MF | 1 - .../META-INF/MANIFEST.MF | 3 +- .../META-INF/MANIFEST.MF | 3 +- .../META-INF/MANIFEST.MF | 1 - .../tools/ddk/test/core/CompoundStep.java | 1 + .../ddk/test/core/MultipleTestProblems.java | 149 ------------------ .../META-INF/MANIFEST.MF | 2 - .../META-INF/MANIFEST.MF | 1 - .../META-INF/MANIFEST.MF | 2 +- ddk-target/ddk.target | 6 +- 10 files changed, 6 insertions(+), 163 deletions(-) delete mode 100644 com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/MultipleTestProblems.java diff --git a/com.avaloq.tools.ddk.check.core.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.core.test/META-INF/MANIFEST.MF index 0bd941889e..d5412a8e0d 100644 --- a/com.avaloq.tools.ddk.check.core.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.core.test/META-INF/MANIFEST.MF @@ -29,7 +29,6 @@ Require-Bundle: com.avaloq.tools.ddk.check.core, org.eclipse.xtext.xbase.testing, junit-jupiter-api, junit-jupiter-engine, - junit-vintage-engine, junit-platform-suite-api Export-Package: com.avaloq.tools.ddk.check.core.test, com.avaloq.tools.ddk.check.core.test.util, diff --git a/com.avaloq.tools.ddk.check.test.runtime.tests/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.check.test.runtime.tests/META-INF/MANIFEST.MF index 1154b3c5e0..1477542dc0 100644 --- a/com.avaloq.tools.ddk.check.test.runtime.tests/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.check.test.runtime.tests/META-INF/MANIFEST.MF @@ -19,8 +19,7 @@ Require-Bundle: com.avaloq.tools.ddk.check.runtime.core, org.eclipse.xtext.xbase.lib, junit-jupiter-api, junit-jupiter-engine, - junit-platform-suite-api, - junit-vintage-engine + junit-platform-suite-api Import-Package: org.hamcrest.core Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.check.test.runtime, diff --git a/com.avaloq.tools.ddk.sample.helloworld.ui.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.sample.helloworld.ui.test/META-INF/MANIFEST.MF index c5372c62e6..dc244afce0 100644 --- a/com.avaloq.tools.ddk.sample.helloworld.ui.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.sample.helloworld.ui.test/META-INF/MANIFEST.MF @@ -20,8 +20,7 @@ Require-Bundle: com.avaloq.tools.ddk.sample.helloworld, org.eclipse.xtext.xbase.ui.testing, junit-jupiter-api, junit-jupiter-engine, - junit-platform-suite-api, - junit-vintage-engine + junit-platform-suite-api Bundle-RequiredExecutionEnvironment: JavaSE-21 Export-Package: com.avaloq.tools.ddk.sample.helloworld.test, com.avaloq.tools.ddk.sample.helloworld.ui;x-internal=true diff --git a/com.avaloq.tools.ddk.test.core/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.test.core/META-INF/MANIFEST.MF index 96ceb6b9ed..5d7748860a 100644 --- a/com.avaloq.tools.ddk.test.core/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.test.core/META-INF/MANIFEST.MF @@ -9,7 +9,6 @@ Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.resources, org.hamcrest.library, - org.junit, org.mockito.mockito-core, com.google.guava, org.apache.commons.lang3, diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/CompoundStep.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/CompoundStep.java index 50e62292e4..7a870497d2 100644 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/CompoundStep.java +++ b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/CompoundStep.java @@ -17,6 +17,7 @@ import org.apache.logging.log4j.Logger; import org.eclipse.core.runtime.Assert; +import com.avaloq.tools.ddk.test.core.jupiter.MultipleTestProblems; import com.google.common.collect.Lists; diff --git a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/MultipleTestProblems.java b/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/MultipleTestProblems.java deleted file mode 100644 index 9d9a521e19..0000000000 --- a/com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/MultipleTestProblems.java +++ /dev/null @@ -1,149 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2016 Avaloq Group AG 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: - * Avaloq Group AG - initial API and implementation - *******************************************************************************/ -package com.avaloq.tools.ddk.test.core; - -import java.io.PrintStream; -import java.io.PrintWriter; -import java.util.List; - -import org.junit.runners.model.MultipleFailureException; - -import com.google.common.collect.Lists; - - -/** - * Contains a list of problems. - */ -@SuppressWarnings("nls") -public class MultipleTestProblems extends AssertionError { - private static final long serialVersionUID = 1L; - private final List problems = Lists.newArrayList(); - - /** - * Creates a new instance of {@link MultipleTestProblems}. - */ - public MultipleTestProblems() { - this(null); - } - - /** - * Creates a new instance of {@link MultipleTestProblems}. - * - * @param problems - * an initial set of problems, may be {@code null} - */ - public MultipleTestProblems(final List problems) { - super("Multiple Test Problems occurred, see stacktrace for info."); - if (problems != null) { - addProblems(problems); - } - } - - /** - * Adds a new problem. - * - * @param problem - * the {@link Throwable} to be added, must not be {@code null} - */ - public final void addProblem(final Throwable problem) { - if (problem instanceof MultipleTestProblems) { - addProblems((MultipleTestProblems) problem); - } else if (problem instanceof MultipleFailureException) { - addProblems(((MultipleFailureException) problem).getFailures()); - } else { - problems.add(problem); - } - } - - /** - * Adds new problems. - * - * @param additionalProblems - * the list of {@link Throwable} to be added, must not be {@code null} - */ - public final void addProblems(final List additionalProblems) { - for (final Throwable problem : additionalProblems) { - addProblem(problem); - } - } - - /** - * Adds new problems of another {@link MutlipleTestProblems} instance. - * - * @param multipleTestProblems - * the list of {@link Throwable} to be added, must not be {@code null} - */ - public final void addProblems(final MultipleTestProblems multipleTestProblems) { - addProblems(multipleTestProblems.getProblems()); - } - - /** - * Returns all problems. - * - * @return all problems, never {@code null} - */ - public List getProblems() { - return Lists.newArrayList(problems); - } - - /** - * Returns {@code true} if there are problems. - * - * @return {@code true} if there are problems, {@code false} otherwise - */ - public boolean hasProblems() { - return !problems.isEmpty(); - } - - @Override - public void printStackTrace(final PrintWriter writer) { - int i = 1; - writer.println(getMessage()); - for (final Throwable problem : problems) { - writer.print(i++ + ". "); - problem.printStackTrace(writer); - } - } - - @Override - public void printStackTrace(final PrintStream stream) { - int i = 1; - stream.println(getMessage()); - for (final Throwable problem : problems) { - stream.print(i++ + ". "); - problem.printStackTrace(stream); - } - } - - /** - * Checks if this {@link MultipleTestProblem} has any problems. - *

- * Note: If there is only one problem, and it is either a {@link RuntimeException} or an {@link Error}, then that problem is thrown. Otherwise this - * {@link MultipleTestProblem} is thrown. - *

- */ - public void assertEmpty() { - if (problems.isEmpty()) { - return; - } - if (problems.size() == 1) { - final Throwable problem = problems.get(0); - if (problem instanceof RuntimeException) { - throw (RuntimeException) problem; - } - if (problem instanceof Error) { - throw (Error) problem; - } - } - printStackTrace(); // NOPMD - throw this; - } -} diff --git a/com.avaloq.tools.ddk.test.ui/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.test.ui/META-INF/MANIFEST.MF index f0c7365a84..db60b17889 100644 --- a/com.avaloq.tools.ddk.test.ui/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.test.ui/META-INF/MANIFEST.MF @@ -13,11 +13,9 @@ Require-Bundle: com.avaloq.tools.ddk.test.core, org.eclipse.swt, org.eclipse.swtbot.eclipse.core, org.eclipse.swtbot.eclipse.finder;visibility:=reexport, - org.eclipse.swtbot.junit4_x, org.eclipse.swtbot.swt.finder, org.eclipse.ui;visibility:=reexport, org.hamcrest.library, - org.junit, junit-jupiter-api, org.mockito.mockito-core, com.google.guava, diff --git a/com.avaloq.tools.ddk.xtext.test.core/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.test.core/META-INF/MANIFEST.MF index 168a2c6b7d..4f8a0010a9 100644 --- a/com.avaloq.tools.ddk.xtext.test.core/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.test.core/META-INF/MANIFEST.MF @@ -19,7 +19,6 @@ Require-Bundle: com.avaloq.tools.ddk.xtext, org.eclipse.xtext.ui, org.eclipse.xtext.xbase, org.eclipse.xtext.xbase.lib;visibility:=reexport, - org.junit, org.mockito.mockito-core, org.hamcrest.library, com.avaloq.tools.ddk.check.runtime.core, diff --git a/com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF b/com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF index 2c06458a3e..9a50843df4 100644 --- a/com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF +++ b/com.avaloq.tools.ddk.xtext.test/META-INF/MANIFEST.MF @@ -28,8 +28,8 @@ Require-Bundle: com.avaloq.tools.ddk.xtext, org.eclipse.emf.ecore, junit-jupiter-api, junit-jupiter-engine, - junit-vintage-engine, junit-platform-suite-api, + junit-platform-suite-engine, org.eclipse.xtext.testing, org.opentest4j Import-Package: com.avaloq.tools.ddk.check.runtime.test.core, diff --git a/ddk-target/ddk.target b/ddk-target/ddk.target index a2ade38df0..7102d4931d 100644 --- a/ddk-target/ddk.target +++ b/ddk-target/ddk.target @@ -1,12 +1,12 @@ - + - + @@ -49,7 +49,6 @@ - @@ -57,7 +56,6 @@ -