Skip to content

Commit

Permalink
Disable InjectionOSGiTest.ensureJavaxIsNotAvailable in I-build tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell authored and iloveeclipse committed May 14, 2024
1 parent 0aa429c commit f98664c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.eclipse.e4.core.di.extensions.OSGiBundle;
import org.eclipse.e4.core.internal.tests.CoreTestsActivator;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.Bundle;
Expand Down Expand Up @@ -109,6 +110,13 @@ public void setUp() throws Exception {

@Test
public void ensureJavaxIsNotAvailable() {
// This entire test-plugin is not really useful if javax.inject and
// jakarta.inject is available and this test-case fails then.
// However due to the way I-build tests are set up (i.e. by using a built
// Eclipse installation) exactly that's the case.
// -> Disable this for I-build tests
Assume.assumeFalse("org.eclipse.ant.core.antRunner".equals(System.getProperty("eclipse.application")));

// Ensure that the providing bundles of the following classes are absent of the
// test-runtime and thus the mentioned classes cannot be loaded
assertThrows(ClassNotFoundException.class, () -> Class.forName("javax.inject.Inject"));
Expand Down

0 comments on commit f98664c

Please sign in to comment.