Skip to content

Commit

Permalink
Revert GEODE-4181: Add JUnit 5 Support (apache#6762)
Browse files Browse the repository at this point in the history
* Revert "GEODE-4181: Add JUnit 5 Support (apache#6740)"

This reverts commit d58482b.

* Revert "GEODE-4181: Use new includeTags property name (apache#6742)"

This reverts commit 32e5a5f.
  • Loading branch information
onichols-pivotal authored Aug 12, 2021
1 parent 8d455b4 commit 9bdfd13
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 74 deletions.
20 changes: 0 additions & 20 deletions boms/geode-all-bom/src/test/resources/expected-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -582,26 +582,6 @@
<artifactId>hamcrest</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.7.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.2</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.7.2</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class DependencyConstraints implements Plugin<Project> {

// These versions are referenced in test.gradle, which is aggressively injected into all projects.
deps.put("junit.version", "4.13.2")
deps.put("junit-jupiter.version", "5.7.2")
deps.put("cglib.version", "3.3.0")
return deps
}
Expand Down Expand Up @@ -222,16 +221,6 @@ class DependencyConstraints implements Plugin<Project> {
entry('hamcrest')
}

dependencySet(group: 'org.junit.jupiter', version: get('junit-jupiter.version')) {
entry('junit-jupiter-api')
entry('junit-jupiter-params')
entry('junit-jupiter-engine')
}

dependencySet(group: 'org.junit.vintage', version: get('junit-jupiter.version')) {
entry('junit-vintage-engine')
}

dependencySet(group: 'org.seleniumhq.selenium', version: '3.141.59') {
entry('selenium-api')
entry('selenium-chrome-driver')
Expand Down
1 change: 0 additions & 1 deletion extensions/geode-modules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ dependencies {
// test
testImplementation('org.apache.bcel:bcel')
testImplementation('junit:junit')
testRuntimeOnly('org.junit.vintage:junit-vintage-engine')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')
testImplementation('org.apache.tomcat:catalina-ha:' + DependencyConstraints.get('tomcat6.version'))
Expand Down
2 changes: 0 additions & 2 deletions geode-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ dependencies {

// test
testImplementation('junit:junit')
testRuntimeOnly('org.junit.vintage:junit-vintage-engine')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')


// jmhTest
jmhTestImplementation('junit:junit')
jmhTestRuntimeOnly('org.junit.vintage:junit-vintage-engine')
jmhTestImplementation('org.assertj:assertj-core')
}
1 change: 0 additions & 1 deletion geode-concurrency-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ dependencies {
implementation('junit:junit')
implementation('org.apache.logging.log4j:log4j-api')
integrationTestImplementation('org.assertj:assertj-core')
integrationTestRuntimeOnly('org.junit.vintage:junit-vintage-engine')
}

integrationTest {
Expand Down
1 change: 0 additions & 1 deletion geode-jmh/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ dependencies {
api('org.openjdk.jmh:jmh-core')

testImplementation('junit:junit')
testRuntimeOnly('org.junit.vintage:junit-vintage-engine')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')
}
Expand Down
5 changes: 0 additions & 5 deletions geode-junit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ dependencies {
api('junit:junit') {
exclude module: 'hamcrest'
}
api('org.junit.jupiter:junit-jupiter-api')
api('org.junit.jupiter:junit-jupiter-params')
api('org.assertj:assertj-core')
api('org.mockito:mockito-core')

Expand All @@ -62,9 +60,6 @@ dependencies {

api('org.skyscreamer:jsonassert')

implementation('org.junit.jupiter:junit-jupiter-engine')
implementation('org.junit.vintage:junit-vintage-engine')

testImplementation('pl.pragmatists:JUnitParams')

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
import org.junit.Before;
import org.junit.ComparisonFailure;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.model.MultipleFailureException;
import org.opentest4j.AssertionFailedError;

@RunWith(JUnitParamsRunner.class)
public class ConcurrencyRuleTest {
Expand Down Expand Up @@ -398,7 +398,7 @@ public void repeatUntilValue_throwsIfValueIsNeverTrue(Execution execution) {
.repeatForDuration(Duration.ofSeconds(2));

assertThatThrownBy(() -> execution.execute(concurrencyRule))
.isInstanceOf(AssertionFailedError.class);
.isInstanceOf(ComparisonFailure.class);
assertThat(invoked.get()).isTrue();
}

Expand Down Expand Up @@ -518,8 +518,8 @@ public void runManyThreads(Execution execution) {
assertThat(errors.get(0)).isInstanceOf(AssertionError.class)
.hasMessageContaining(IOException.class.getName());
assertThat(errors.get(1)).isInstanceOf(AssertionError.class)
.hasMessageContaining("successful value")
.hasMessageContaining("wrong value");
.hasMessageContaining("[successful] value")
.hasMessageContaining("[wrong] value");
assertThat(errors.get(2)).hasMessageContaining("foo")
.isInstanceOf(IOException.class);
}
Expand Down
21 changes: 1 addition & 20 deletions geode-junit/src/test/resources/expected-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down Expand Up @@ -148,14 +138,5 @@
<artifactId>jsonassert</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>runtime</scope>
</dependency> </dependencies>
</dependencies>
</project>
1 change: 0 additions & 1 deletion geode-rebalancer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ dependencies {
}

testImplementation('junit:junit')
testImplementation('org.junit.vintage:junit-vintage-engine')
testImplementation('org.assertj:assertj-core')
testImplementation('org.mockito:mockito-core')

Expand Down
10 changes: 3 additions & 7 deletions gradle/test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ compileTestJava {
}

test {
useJUnitPlatform {}
doFirst {
TestPropertiesWriter.writeTestProperties(buildDir, name)
}
Expand Down Expand Up @@ -92,9 +91,9 @@ configure([integrationTest, distributedTest, performanceTest, acceptanceTest, ui
}

configure([integrationTest, distributedTest, performanceTest]) {
useJUnitPlatform {
useJUnit {
if (project.hasProperty("testCategory")) {
includeTags += project.testCategory
includeCategories += project.testCategory
}
}
}
Expand Down Expand Up @@ -136,7 +135,6 @@ task repeatUnitTest(type: RepeatTest) {
}

configure([integrationTest, distributedTest, performanceTest, acceptanceTest, uiTest, upgradeTest]) {
useJUnitPlatform {}
if (project.hasProperty('excludeTest')) {
exclude project.getProperty('excludeTest').split(',')
}
Expand All @@ -145,9 +143,7 @@ configure([integrationTest, distributedTest, performanceTest, acceptanceTest, ui
configure([repeatDistributedTest, repeatIntegrationTest, repeatUpgradeTest, repeatUnitTest, repeatAcceptanceTest]) {
times = Integer.parseInt(repeat)
forkEvery 1
useJUnitPlatform {
excludeTags += "org.apache.geode.test.junit.categories.IgnoreInRepeatTestTasks"
}
useJUnit {}
outputs.upToDateWhen { false }

if (project.hasProperty("failOnNoMatchingTests")) {
Expand Down
1 change: 0 additions & 1 deletion static-analysis/pmd-rules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ apply from: "${rootDir}/${scriptDir}/warnings.gradle"

dependencies {
implementation(platform(project(':boms:geode-all-bom')))
testRuntimeOnly('org.junit.vintage:junit-vintage-engine')
implementation('net.sourceforge.pmd:pmd-java')
testImplementation('net.sourceforge.pmd:pmd-test')
}

0 comments on commit 9bdfd13

Please sign in to comment.