From 42383b9ca16b218db6f8619dcc480bf4ad0dd168 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: Thu, 28 Sep 2023 11:25:15 +0300 Subject: [PATCH] Stop using deprecated Verifier methods --- .../product/Tycho188P2EnabledRcpTest.java | 7 ++- .../MavenReactorMakeOptionsTest.java | 58 +++++++++---------- .../TargetDefinitionPackagingTypeTest.java | 2 +- 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/product/Tycho188P2EnabledRcpTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/product/Tycho188P2EnabledRcpTest.java index d953b13684..f2baf53e7b 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/product/Tycho188P2EnabledRcpTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/product/Tycho188P2EnabledRcpTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2021 SAP AG and others. + * Copyright (c) 2010, 2023 SAP AG and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -28,6 +28,7 @@ import java.util.Properties; import java.util.Set; +import org.apache.maven.it.VerificationException; import org.apache.maven.it.Verifier; import org.eclipse.tycho.TargetEnvironment; import org.eclipse.tycho.test.AbstractTychoIntegrationTest; @@ -237,8 +238,8 @@ private static void assertContainsEntry(File file, String prefix) throws Excepti } } - static private void assertRepositoryArtifacts(Verifier verifier) { - verifier.assertArtifactPresent(GROUP_ID, ARTIFACT_ID, VERSION, "zip"); + static private void assertRepositoryArtifacts(Verifier verifier) throws VerificationException { + verifier.verifyArtifactPresent(GROUP_ID, ARTIFACT_ID, VERSION, "zip"); } static private void assertTotalZipArtifacts(final Verifier verifier, final int expectedArtifacts) { diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/reactor/makeBehaviour/MavenReactorMakeOptionsTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/reactor/makeBehaviour/MavenReactorMakeOptionsTest.java index aa65eb7e86..46677defe8 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/reactor/makeBehaviour/MavenReactorMakeOptionsTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/reactor/makeBehaviour/MavenReactorMakeOptionsTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2022 Joe Shannon and others. + * Copyright (c) 2022, 2023 Joe Shannon and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -51,12 +51,12 @@ public void setUp() throws Exception { public void testCompleteBuild() throws Exception { verifier.executeGoals(List.of("clean", "verify")); verifyErrorFreeLog(verifier); - verifier.assertFilePresent("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("bundle1a/target/bundle1a-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("bundle1b/target/bundle1b-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("feature1/target/feature1-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("feature2/target/feature2-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1a/target/bundle1a-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1b/target/bundle1b-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("feature1/target/feature1-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("feature2/target/feature2-1.0.0-SNAPSHOT.jar"); } @Test @@ -66,12 +66,12 @@ public void testAlsoMake() throws Exception { verifier.addCliOption("-pl feature1"); verifier.executeGoals(List.of("clean", "verify")); verifyErrorFreeLog(verifier); - verifier.assertFilePresent("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar"); - verifier.assertFileNotPresent("bundle1a/target/bundle1a-1.0.0-SNAPSHOT.jar"); - verifier.assertFileNotPresent("bundle1b/target/bundle1b-1.0.0-SNAPSHOT.jar"); - verifier.assertFileNotPresent("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("feature1/target/feature1-1.0.0-SNAPSHOT.jar"); - verifier.assertFileNotPresent("feature2/target/feature2-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar"); + verifier.verifyFileNotPresent("bundle1a/target/bundle1a-1.0.0-SNAPSHOT.jar"); + verifier.verifyFileNotPresent("bundle1b/target/bundle1b-1.0.0-SNAPSHOT.jar"); + verifier.verifyFileNotPresent("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("feature1/target/feature1-1.0.0-SNAPSHOT.jar"); + verifier.verifyFileNotPresent("feature2/target/feature2-1.0.0-SNAPSHOT.jar"); } @Test @@ -97,12 +97,12 @@ public void testAlsoMakeWithIndirectDependencies() throws Exception { verifier.addCliOption("-pl bundle1b"); verifier.executeGoals(List.of("clean", "verify")); verifyErrorFreeLog(verifier); - verifier.assertFilePresent("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("bundle1a/target/bundle1a-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("bundle1b/target/bundle1b-1.0.0-SNAPSHOT.jar"); - verifier.assertFileNotPresent("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar"); - verifier.assertFileNotPresent("feature1/target/feature1-1.0.0-SNAPSHOT.jar"); - verifier.assertFileNotPresent("feature2/target/feature2-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1a/target/bundle1a-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1b/target/bundle1b-1.0.0-SNAPSHOT.jar"); + verifier.verifyFileNotPresent("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar"); + verifier.verifyFileNotPresent("feature1/target/feature1-1.0.0-SNAPSHOT.jar"); + verifier.verifyFileNotPresent("feature2/target/feature2-1.0.0-SNAPSHOT.jar"); } @Test @@ -112,12 +112,12 @@ public void testAlsoMakeDependentsNeedsToPickUpDependenciesOfDependents() throws verifier.addCliOption("-pl bundle1"); verifier.executeGoals(List.of("clean", "verify")); verifyErrorFreeLog(verifier); - verifier.assertFilePresent("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("bundle1a/target/bundle1a-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("bundle1b/target/bundle1b-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("feature1/target/feature1-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("feature2/target/feature2-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1a/target/bundle1a-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1b/target/bundle1b-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("feature1/target/feature1-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("feature2/target/feature2-1.0.0-SNAPSHOT.jar"); } @Test @@ -128,10 +128,10 @@ public void testBoth() throws Exception { verifier.addCliOption("-pl feature1,bundle2"); verifier.executeGoals(List.of("clean", "verify")); verifyErrorFreeLog(verifier); - verifier.assertFilePresent("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("feature1/target/feature1-1.0.0-SNAPSHOT.jar"); - verifier.assertFilePresent("feature2/target/feature2-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("feature1/target/feature1-1.0.0-SNAPSHOT.jar"); + verifier.verifyFilePresent("feature2/target/feature2-1.0.0-SNAPSHOT.jar"); } @Test diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/target/TargetDefinitionPackagingTypeTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/target/TargetDefinitionPackagingTypeTest.java index 895d4ddbf1..425be479ed 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/target/TargetDefinitionPackagingTypeTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/target/TargetDefinitionPackagingTypeTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2018 SAP AG and others. + * Copyright (c) 2012, 2023 SAP AG and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at