Skip to content

Commit

Permalink
[Issue #750] junit should only be used in tests (#751)
Browse files Browse the repository at this point in the history
* junit should only be used in tests

add back assertj

revert assertj changes

build issues

centralise junit dependency

Update build.gradle

* junit 4.12 has a CVE

close #750
  • Loading branch information
pjfanning authored Feb 8, 2022
1 parent f1b42ae commit 63db59b
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 12 deletions.
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ allprojects {
maxWarnings = 0
configFile = new File("${rootDir}/style/checkStyle.xml")
}

dependencies {
testImplementation "junit:junit"
}
}

task tar(type: Tar) {
Expand Down Expand Up @@ -449,7 +453,7 @@ subprojects {
dependency "org.springframework.boot:spring-boot-starter-web:2.1.6.RELEASE"
dependency "io.openmessaging:registry-server:0.0.1"

dependency "junit:junit:4.12"
dependency "junit:junit:4.13.2"
dependency "com.github.stefanbirkner:system-rules:1.16.1"
dependency "org.assertj:assertj-core:2.6.0"

Expand Down
4 changes: 1 addition & 3 deletions eventmesh-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
dependencies {
api "com.google.guava:guava"
api "org.slf4j:slf4j-api"
api "junit:junit"
api "org.assertj:assertj-core"
api "org.apache.commons:commons-collections4"
api "org.apache.commons:commons-text"
Expand Down Expand Up @@ -65,10 +64,9 @@ dependencies {

testImplementation "io.netty:netty-all"

testImplementation "junit:junit"
testImplementation "org.assertj:assertj-core"

testImplementation "org.mockito:mockito-core"
testImplementation "org.powermock:powermock-module-junit4"
testImplementation "org.powermock:powermock-api-mockito2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@
dependencies {
implementation project(":eventmesh-common")
implementation project(":eventmesh-connector-plugin:eventmesh-connector-api")

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ dependencies {
testImplementation project(":eventmesh-common")

testImplementation "io.cloudevents:cloudevents-core"
testImplementation "junit:junit"

compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ dependencies {
implementation "io.cloudevents:cloudevents-core"
implementation "com.google.guava:guava"
implementation "io.cloudevents:cloudevents-json-jackson"

testImplementation "junit:junit"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ dependencies {

testImplementation project(":eventmesh-protocol-plugin:eventmesh-protocol-api")
testImplementation "io.cloudevents:cloudevents-core"
testImplementation "junit:junit"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ dependencies {
testImplementation project(":eventmesh-protocol-plugin:eventmesh-protocol-api")
testImplementation "io.cloudevents:cloudevents-core"
testImplementation "io.openmessaging:openmessaging-api"
testImplementation "junit:junit"
}
2 changes: 1 addition & 1 deletion tools/third-party-dependencies/known-dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ javassist-3.20.0-GA.jar
jcommander-1.72.jar
jna-4.2.2.jar
jsr305-3.0.2.jar
junit-4.12.jar
junit-4.13.2.jar
listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
log4j-api-2.17.1.jar
log4j-core-2.17.1.jar
Expand Down
2 changes: 1 addition & 1 deletion tools/third-party-licenses/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ EPL licenses
The following components are provided under the EPL License. See project link for details.
The text of each license is also included at licenses/LICENSE-[project].txt.

junit 4.12: https://github.com/junit-team/junit5, EPL
junit 4.13.2: https://github.com/junit-team/junit5, EPL
logback-core 1.0.13: https://github.com/qos-ch/logback, EPL

========================================================================
Expand Down

0 comments on commit 63db59b

Please sign in to comment.