This is an automated email from the ASF dual-hosted git repository. azotcsit pushed a commit to branch cassandra-16630_junit5 in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit 667a8946a01b128b61b06e96f5f09f5c11973c2a Author: Aleksei Zotov <azotc...@gmail.com> AuthorDate: Sat Nov 13 23:47:47 2021 +0400 CASSANDRA-16630. Updated dependencies. --- build.xml | 27 +++++++-------- .../org/apache/cassandra/Junit4SampleTest.java | 39 +++++++++++++++++++++ .../org/apache/cassandra/Junit5SampleTest.java | 40 ++++++++++++++++++++++ 3 files changed, 91 insertions(+), 15 deletions(-) diff --git a/build.xml b/build.xml index 085211a..6b6d71b 100644 --- a/build.xml +++ b/build.xml @@ -120,6 +120,7 @@ <property name="allocation-instrumenter.version" value="3.1.0"/> <property name="bytebuddy.version" value="1.10.10"/> <property name="jflex.version" value="1.8.2"/> + <property name="junit.version" value="5.6.0"/> <!-- https://mvnrepository.com/artifact/net.openhft/chronicle-bom/1.16.23 --> <property name="chronicle-queue.version" value="5.20.123" /> @@ -524,10 +525,6 @@ <dependency groupId="com.boundary" artifactId="high-scale-lib" version="1.0.6"/> <dependency groupId="com.github.jbellis" artifactId="jamm" version="${jamm.version}"/> <dependency groupId="org.yaml" artifactId="snakeyaml" version="1.26"/> - <dependency groupId="junit" artifactId="junit" version="4.12" scope="test"> - <exclusion groupId="org.hamcrest" artifactId="hamcrest-core"/> - </dependency> - <dependency groupId="org.mockito" artifactId="mockito-core" version="3.2.4" scope="test"/> <dependency groupId="org.quicktheories" artifactId="quicktheories" version="0.26" scope="test"/> <dependency groupId="com.google.code.java-allocation-instrumenter" artifactId="java-allocation-instrumenter" version="${allocation-instrumenter.version}" scope="test"> <exclusion groupId="com.google.guava" artifactId="guava"/> @@ -565,8 +562,6 @@ <dependency groupId="org.openjdk.jmh" artifactId="jmh-core" version="1.21" scope="test"/> <dependency groupId="org.openjdk.jmh" artifactId="jmh-generator-annprocess" version="1.21" scope="test"/> - <dependency groupId="org.apache.ant" artifactId="ant-junit" version="1.9.7" scope="test"/> - <dependency groupId="org.apache.cassandra" artifactId="cassandra-all" version="${version}" /> <dependency groupId="io.dropwizard.metrics" artifactId="metrics-core" version="3.1.5" /> <dependency groupId="io.dropwizard.metrics" artifactId="metrics-jvm" version="3.1.5" /> @@ -650,11 +645,15 @@ <dependency groupId="org.psjava" artifactId="psjava" version="0.1.19"/> <dependency groupId="javax.inject" artifactId="javax.inject" version="1"/> <dependency groupId="com.google.j2objc" artifactId="j2objc-annotations" version="1.3"/> - <!-- adding this dependency is necessary for assertj. When updating assertj, need to also update the version of - this that the new assertj's `assertj-parent-pom` depends on. --> - <dependency groupId="org.junit" artifactId="junit-bom" version="5.6.0" type="pom" scope="test"/> - <!-- when updating assertj, make sure to also update the corresponding junit-bom dependency --> + + <dependency groupId="org.apache.ant" artifactId="ant-junitlauncher" version="1.10.11" scope="test"/> + <dependency groupId="org.junit.jupiter" artifactId="junit-jupiter" version="${junit.version}" scope="test"/> + <dependency groupId="org.junit.vintage" artifactId="junit-vintage-engine" version="${junit.version}" scope="test"> + <exclusion groupId="org.hamcrest" artifactId="hamcrest-core"/> + </dependency> + <!-- when updating assertj, make sure to also update the corresponding junit dependencies --> <dependency groupId="org.assertj" artifactId="assertj-core" version="3.15.0" scope="provided"/> + <dependency groupId="org.mockito" artifactId="mockito-core" version="3.2.4" scope="test"/> <dependency groupId="org.awaitility" artifactId="awaitility" version="4.0.3" scope="test"> <exclusion groupId="org.hamcrest" artifactId="hamcrest"/> </dependency> @@ -716,7 +715,6 @@ artifactId="cassandra-parent" version="${version}" relativePath="${final.name}-parent.pom"/> - <dependency groupId="junit" artifactId="junit" scope="test"/> <dependency groupId="commons-io" artifactId="commons-io" scope="test"/> <dependency groupId="org.mockito" artifactId="mockito-core" scope="test"/> <dependency groupId="com.puppycrawl.tools" artifactId="checkstyle" scope="test"/> @@ -727,10 +725,9 @@ <dependency groupId="org.openjdk.jmh" artifactId="jmh-core" scope="test"/> <dependency groupId="org.openjdk.jmh" artifactId="jmh-generator-annprocess" scope="test"/> <dependency groupId="net.ju-n.compile-command-annotations" artifactId="compile-command-annotations" scope="test"/> - <dependency groupId="org.apache.ant" artifactId="ant-junit" version="1.9.7" scope="test"/> - <!-- adding this dependency is necessary for assertj. When updating assertj, need to also update the version of - this that the new assertj's `assertj-parent-pom` depends on. --> - <dependency groupId="org.junit" artifactId="junit-bom" type="pom"/> + <dependency groupId="org.apache.ant" artifactId="ant-junitlauncher" scope="test"/> + <dependency groupId="org.junit.jupiter" artifactId="junit-jupiter" scope="test"/> + <dependency groupId="org.junit.vintage" artifactId="junit-vintage-engine" scope="test"/> <dependency groupId="org.awaitility" artifactId="awaitility"/> <dependency groupId="org.hamcrest" artifactId="hamcrest"/> <!-- coverage debs --> diff --git a/test/unit/org/apache/cassandra/Junit4SampleTest.java b/test/unit/org/apache/cassandra/Junit4SampleTest.java new file mode 100644 index 0000000..7eb27a5 --- /dev/null +++ b/test/unit/org/apache/cassandra/Junit4SampleTest.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.cassandra; + +import org.junit.Test; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +public class Junit4SampleTest +{ + @Test + public void testSuccess() + { + assertTrue(true); + } + + @Test + public void testFailure() + { + fail("Expected failure"); + } +} diff --git a/test/unit/org/apache/cassandra/Junit5SampleTest.java b/test/unit/org/apache/cassandra/Junit5SampleTest.java new file mode 100644 index 0000000..0388d3c --- /dev/null +++ b/test/unit/org/apache/cassandra/Junit5SampleTest.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.cassandra; + + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +public class Junit5SampleTest +{ + @Test + public void testSuccess() + { + assertTrue(true); + } + + @Test + public void testFailure() + { + fail("Expected failure"); + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org