Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8274274: Update JUnit to version 5.8.1 #633

Closed
wants to merge 12 commits into from
@@ -1944,7 +1944,12 @@ allprojects {
// By default all of our projects require junit for testing so we can just
// setup this dependency here.
dependencies {
testImplementation group: "junit", name: "junit", version: "4.8.2"
testImplementation(group: "org.junit.jupiter", name: "junit-jupiter", version: "5.8.1") {
exclude(group: "org.apiguardian", module: "apiguardian-api")
}
testRuntimeOnly(group: "org.junit.vintage", name: "junit-vintage-engine", version: "5.8.1") {
exclude(group: "org.apiguardian", module: "apiguardian-api")
}
hjohn marked this conversation as resolved.
Show resolved Hide resolved
if (BUILD_CLOSED && DO_JCOV) {
testImplementation name: "jcov"
}
@@ -1959,6 +1964,8 @@ allprojects {
// Java 7 but when we switch to 8 this will be needed, and probably again when
// we start building with Java 9.
test {
useJUnitPlatform();

executable = JAVA;
enableAssertions = true;
testLogging.exceptionFormat = "full";
@@ -111,6 +111,14 @@
<sha256 value="c80313e6c26c0b9e0c241504718e2d8bbc2798b73429933adf03fdc6d84f0e70" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="junit" name="junit" version="4.13.2">
<artifact name="junit-4.13.2.jar">
<sha256 value="8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-4.13.2.pom">
<sha256 value="569b6977ee4603c965c1c46c3058fa6e969291b0160eb6964dd092cd89eadd94" origin="Generated by Gradle"/>
</artifact>
</component>
hjohn marked this conversation as resolved.
Show resolved Hide resolved
<component group="junit" name="junit" version="4.8.2">
<artifact name="junit-4.8.2.jar">
<sha256 value="a2aa2c3bb2b72da76c3e6a71531f1eefdc350494819baf2b1d80d7146e020f9e" origin="Generated by Gradle"/>
@@ -242,6 +250,91 @@
<sha256 value="6d7c68423115f921718d944f859924b4c685217ec03a49f70455a8b2caa972e6" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hamcrest" name="hamcrest-core" version="1.3">
<artifact name="hamcrest-core-1.3.jar">
<sha256 value="66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9" origin="Generated by Gradle"/>
</artifact>
<artifact name="hamcrest-core-1.3.pom">
<sha256 value="fde386a7905173a1b103de6ab820727584b50d0e32282e2797787c20a64ffa93" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hamcrest" name="hamcrest-parent" version="1.3">
<artifact name="hamcrest-parent-1.3.pom">
<sha256 value="6d535f94efb663bdb682c9f27a50335394688009642ba7a9677504bc1be4129b" origin="Generated by Gradle"/>
</artifact>
</component>
hjohn marked this conversation as resolved.
Show resolved Hide resolved
<component group="org.junit" name="junit-bom" version="5.8.1">
<artifact name="junit-bom-5.8.1.pom">
<sha256 value="ef7dc47f8e4a16864f4779728e87ed78539819e4fb892768a9da6b8ef903f863" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-bom-5.8.1.module">
<sha256 value="6b82cba52a134b13c1982f0cf9622c6d485371d40b989246f3124e3b0a5b1854" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter" version="5.8.1">
<artifact name="junit-jupiter-5.8.1.jar">
<sha256 value="8f1049ee24b34a10b60cd810048099f781c2658cde2181e831496ab30a982985" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-jupiter-5.8.1.module">
<sha256 value="2e34ba4c858c38cd0a365afffecc932a7196ce9385e2eb5405942e581c15ff5c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter-api" version="5.8.1">
<artifact name="junit-jupiter-api-5.8.1.jar">
<sha256 value="ce3374a7efba605e2d2b69a3fef90134032bab3ecc3ed8579a4871b1c2c4729c" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-jupiter-api-5.8.1.module">
<sha256 value="0d69dbc236b7dcaab4ca7369aa560e9b0a9bbef7f958882ffb48533cbba7c09d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter-engine" version="5.8.1">
<artifact name="junit-jupiter-engine-5.8.1.jar">
<sha256 value="4689bc902255a19fe98277683ba3231c094d107c54c8d35f2b6f9c97d226418e" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-jupiter-engine-5.8.1.module">
<sha256 value="68790fec33f97b0ec840cf47ac40ee0c72e056f122ca0f3c6646743349937699" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter-params" version="5.8.1">
<artifact name="junit-jupiter-params-5.8.1.jar">
<sha256 value="389b8d13a8d8872fcbd4f0eba7b2c46afc628419f9a1b2a3a9f93241a06a7218" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-jupiter-params-5.8.1.module">
<sha256 value="124d603c6d8033366d8ca471636b446e38b9cc1bd010f329542358187afa865e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.platform" name="junit-platform-commons" version="1.8.1">
<artifact name="junit-platform-commons-1.8.1.jar">
<sha256 value="fa4fa68c8bd54dd0cb49c3fcbe9b2e42f4da6bedbe7e7ccf2a05f1a1e609b593" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-platform-commons-1.8.1.module">
<sha256 value="698fd0541acb7effc6659848fd0c7dd5010a49f15f0c1cba43e535807f90f66b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.platform" name="junit-platform-engine" version="1.8.1">
<artifact name="junit-platform-engine-1.8.1.jar">
<sha256 value="702868ed7e86b9b4672ede0f1e185e905baca9afab57746a7c650be3c7bca047" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-platform-engine-1.8.1.module">
<sha256 value="d9f420a64539a3edf60f80df0c6fd722b750725744c79ca40f7d25ae56ca4ba4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.vintage" name="junit-vintage-engine" version="5.8.1">
<artifact name="junit-vintage-engine-5.8.1.jar">
<sha256 value="176b53cd1bdbf9233e96c8b0c7a9e5b864282fbbdeba43b5ceafdedb29a49156" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-vintage-engine-5.8.1.module">
<sha256 value="9ce9fa2e4ee6a740d610102530462a71ce0fa9d2f1418522e4b2bdb6072f679a" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.opentest4j" name="opentest4j" version="1.2.0">
<artifact name="opentest4j-1.2.0.jar">
<sha256 value="58812de60898d976fb81ef3b62da05c6604c18fd4a249f5044282479fc286af2" origin="Generated by Gradle"/>
</artifact>
<artifact name="opentest4j-1.2.0.pom">
<sha256 value="a96e671816c1ff8803bdec74c9241f025bdfb277da5d2b4ee02266405936f994" origin="Generated by Gradle"/>
</artifact>
</component>
hjohn marked this conversation as resolved.
Show resolved Hide resolved
<component group="org.sonatype.oss" name="oss-parent" version="7">
<artifact name="oss-parent-7.pom">
<sha256 value="b51f8867c92b6a722499557fc3a1fdea77bdf9ef574722fe90ce436a29559454" origin="Generated by Gradle"/>
@@ -20,6 +20,11 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

package test;
hjohn marked this conversation as resolved.
Show resolved Hide resolved

import org.junit.jupiter.api.Test;

public class JUnit5Test {

@Test
void junit5ShouldWork() {
System.err.println("JUnit 5 test working!");
hjohn marked this conversation as resolved.
Show resolved Hide resolved
}
}