From 955e4f3fe3a9c3d146dbaef66325c8957ebd98ed Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 16 Mar 2021 07:56:47 +0000 Subject: [PATCH 1/2] Bump baseline, remove pointless test breaking CI --- pom.xml | 8 +-- .../java/jenkins/scm/impl/MessagesTest.java | 63 ------------------- 2 files changed, 4 insertions(+), 67 deletions(-) delete mode 100644 src/test/java/jenkins/scm/impl/MessagesTest.java diff --git a/pom.xml b/pom.xml index 1ceded14..17eef691 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ org.jenkins-ci.plugins plugin - 4.1 + 4.17 @@ -67,7 +67,7 @@ 2.6.5 -SNAPSHOT - 2.176.4 + 2.222.4 8 false 2.0.0 @@ -90,8 +90,8 @@ io.jenkins.tools.bom - bom-2.176.x - 9 + bom-2.222.x + 26 import pom diff --git a/src/test/java/jenkins/scm/impl/MessagesTest.java b/src/test/java/jenkins/scm/impl/MessagesTest.java deleted file mode 100644 index fec560ea..00000000 --- a/src/test/java/jenkins/scm/impl/MessagesTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * The MIT License - * - * Copyright (c) 2016 CloudBees, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -package jenkins.scm.impl; - -import java.lang.reflect.Method; -import org.junit.Test; -import org.junit.experimental.theories.DataPoints; -import org.junit.experimental.theories.Theories; -import org.junit.experimental.theories.Theory; -import org.junit.runner.RunWith; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.notNullValue; - -/** - * The code coverage for the generated Messages class doesn't matter, so this test stops them from dragging the coverage - * down and results in a clearer measure of code coverage for the module. - */ -@RunWith(Theories.class) -public class MessagesTest { - @DataPoints - public static Method[] hack() { - return Messages.class.getDeclaredMethods(); - } - - @Theory - public void coverage(Method method) throws Exception { - Class[] types = method.getParameterTypes(); - Object[] args = new Object[types.length]; - for (int i = 0; i < types.length; i++) { - args[i] = (long) i; // long works as a number, string and date - } - assertThat(method.invoke(null, args), notNullValue()); - } - - @Test - public void constructor() throws Exception { - new Messages(); - } -} From 889227d8f450b87f00ed0dbe5aa78777f9ee1a8a Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 16 Mar 2021 11:38:20 +0000 Subject: [PATCH 2/2] Remove other test --- .../java/jenkins/scm/api/MessagesTest.java | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 src/test/java/jenkins/scm/api/MessagesTest.java diff --git a/src/test/java/jenkins/scm/api/MessagesTest.java b/src/test/java/jenkins/scm/api/MessagesTest.java deleted file mode 100644 index 303c2bcf..00000000 --- a/src/test/java/jenkins/scm/api/MessagesTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * The MIT License - * - * Copyright (c) 2016 CloudBees, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -package jenkins.scm.api; - -import java.lang.reflect.Method; -import org.junit.Test; -import org.junit.experimental.theories.DataPoints; -import org.junit.experimental.theories.Theories; -import org.junit.experimental.theories.Theory; -import org.junit.runner.RunWith; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.notNullValue; - -/** - * The code coverage for the generated Messages class doesn't matter, so this test stops them from dragging the coverage - * down and results in a clearer measure of code coverage for the module. - */ -@RunWith(Theories.class) -public class MessagesTest { - @DataPoints - public static Method[] hack() { - return Messages.class.getDeclaredMethods(); - } - - @Theory - public void coverage(Method method) throws Exception { - Class[] types = method.getParameterTypes(); - Object[] args = new Object[types.length]; - for (int i = 0; i < types.length; i++) { - args[i] = (long) i; // long works as a number, string and date - } - assertThat(method.invoke(null, args), notNullValue()); - } - - @Test - public void constructor() throws Exception { - new Messages(); - } -}