From 9493d73e889f133100e892b93fcadf44423100eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Mon, 9 Dec 2024 12:45:13 +0200 Subject: [PATCH] Run tests on 2024-12 --- .../org/eclipse/tycho/TychoConstants.java | 2 +- .../AbstractTychoExtrasIntegrationTest.java | 2 -- .../extras/pde/TestListDependencies.java | 19 ++++++++++--------- .../dependency-with-nested-jar/pom.xml | 2 +- .../ExplodedTestDependenciesTest.java | 2 +- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java b/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java index bcf6e6a2aa..2ee45c8b2a 100644 --- a/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java +++ b/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java @@ -18,7 +18,7 @@ public interface TychoConstants { - public static final String ECLIPSE_LATEST = "https://download.eclipse.org/releases/2024-09/"; + public static final String ECLIPSE_LATEST = "https://download.eclipse.org/releases/2024-12/"; public static final String TYCHO_NOT_CONFIGURED = "Tycho build extension not configured for "; diff --git a/tycho-extras/tycho-extras-its/src/test/java/org/eclipse/tycho/extras/its/AbstractTychoExtrasIntegrationTest.java b/tycho-extras/tycho-extras-its/src/test/java/org/eclipse/tycho/extras/its/AbstractTychoExtrasIntegrationTest.java index 3d837cdd9e..484b980c1c 100644 --- a/tycho-extras/tycho-extras-its/src/test/java/org/eclipse/tycho/extras/its/AbstractTychoExtrasIntegrationTest.java +++ b/tycho-extras/tycho-extras-its/src/test/java/org/eclipse/tycho/extras/its/AbstractTychoExtrasIntegrationTest.java @@ -19,8 +19,6 @@ public class AbstractTychoExtrasIntegrationTest extends AbstractTychoIntegrationTest { - public static final String P2_REPO = "https:///download.eclipse.org/releases/2019-09/"; - @Override protected File getBasedir(String test) throws IOException { return new File("target/test-classes", test).getAbsoluteFile(); diff --git a/tycho-extras/tycho-extras-its/src/test/java/org/eclipse/tycho/extras/pde/TestListDependencies.java b/tycho-extras/tycho-extras-its/src/test/java/org/eclipse/tycho/extras/pde/TestListDependencies.java index dd86effd3c..d9ac5ca163 100644 --- a/tycho-extras/tycho-extras-its/src/test/java/org/eclipse/tycho/extras/pde/TestListDependencies.java +++ b/tycho-extras/tycho-extras-its/src/test/java/org/eclipse/tycho/extras/pde/TestListDependencies.java @@ -9,13 +9,15 @@ *******************************************************************************/ package org.eclipse.tycho.extras.pde; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import java.io.BufferedReader; import java.io.File; import java.nio.file.Files; import org.apache.maven.it.Verifier; import org.eclipse.tycho.extras.its.AbstractTychoExtrasIntegrationTest; -import org.junit.Assert; import org.junit.Test; public class TestListDependencies extends AbstractTychoExtrasIntegrationTest { @@ -26,27 +28,26 @@ public void testDependencyInReactor() throws Exception { verifier.executeGoal("verify"); verifier.verifyErrorFreeLog(); File file = new File(verifier.getBasedir(), "dependent/target/dependencies-list.txt"); - Assert.assertTrue(file.exists()); + assertTrue(file.exists()); try (BufferedReader reader = Files.newBufferedReader(file.toPath());) { File dependency = new File(reader.readLine()); - Assert.assertTrue(dependency.exists()); - Assert.assertEquals("dependency-0.1.0-SNAPSHOT.jar", dependency.getName()); + assertTrue(dependency.exists()); + assertEquals("dependency-0.1.0-SNAPSHOT.jar", dependency.getName()); } } @Test public void testDependencyWithNestedJar() throws Exception { - Verifier verifier = getVerifier("dependencyList/dependency-with-nested-jar", false); - verifier.addCliOption("-Dp2-repo=" + P2_REPO); + Verifier verifier = getVerifier("dependencyList/dependency-with-nested-jar"); verifier.executeGoal("verify"); verifier.verifyErrorFreeLog(); File file = new File(verifier.getBasedir(), "target/dependencies-list.txt"); - Assert.assertTrue(file.exists()); + assertTrue(file.exists()); try (BufferedReader reader = Files.newBufferedReader(file.toPath()) // ) { // File dependency = new File(reader.readLine()); - Assert.assertTrue(dependency.exists()); - Assert.assertEquals("org.junit-4.12.0.v201504281640.jar", dependency.getName()); + assertTrue(dependency.exists()); + assertEquals("org.junit-4.13.2.v20240929-1000.jar", dependency.getName()); } } } diff --git a/tycho-extras/tycho-extras-its/src/test/resources/dependencyList/dependency-with-nested-jar/pom.xml b/tycho-extras/tycho-extras-its/src/test/resources/dependencyList/dependency-with-nested-jar/pom.xml index 5cec52a0c2..7e525c885a 100644 --- a/tycho-extras/tycho-extras-its/src/test/resources/dependencyList/dependency-with-nested-jar/pom.xml +++ b/tycho-extras/tycho-extras-its/src/test/resources/dependencyList/dependency-with-nested-jar/pom.xml @@ -33,7 +33,7 @@ p2-repo - ${p2-repo} + ${target-platform} p2 diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ExplodedTestDependenciesTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ExplodedTestDependenciesTest.java index f5c69ca9cf..02196a436f 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ExplodedTestDependenciesTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ExplodedTestDependenciesTest.java @@ -31,7 +31,7 @@ public void testLocalMavenRepository() throws Exception { // TODO this is only an indirect test; it should test that the bundles nested // jars are accessible as file URLs File antHome = new File(v01.getBasedir(), - "tycho340.test/target/work/plugins/org.apache.ant_1.10.14.v20230922-1200"); + "tycho340.test/target/work/plugins/org.apache.ant_1.10.15.v20240901-1000"); Assert.assertTrue(antHome.isDirectory()); }