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

Exclude junit4 so it stops getting accidentally imported #1122

Merged
merged 1 commit into from Jul 28, 2019

Conversation

@jjestrel
Copy link
Collaborator

commented Jul 27, 2019

I think using implementation also fixes this but that's a bigger change.

People have been accidentally importing the wrong @Test which leads to injection stuff not getting set up which is a very confusing error message

@jjestrel jjestrel requested a review from swankjesse Jul 27, 2019

@jjestrel jjestrel force-pushed the jayestrella/20190727-exclude-junit4 branch 6 times, most recently from fa88de3 to 929f24c Jul 28, 2019

@@ -39,6 +39,7 @@ ext.dep = [
"jettyWebsocketServer": "org.eclipse.jetty.websocket:websocket-server:9.4.18.v20190429",
"jettyWebsocketServlet": "org.eclipse.jetty.websocket:websocket-servlet:9.4.18.v20190429",
"jnrUnixsocket": "com.github.jnr:jnr-unixsocket:0.22",
"junit4": "junit:junit:4.12",

This comment has been minimized.

Copy link
@jjestrel

jjestrel Jul 28, 2019

Author Collaborator

misk:misk needs this because okhttp mock webserver needs it

import java.io.ByteArrayOutputStream
import java.security.GeneralSecurityException

@MiskTest(startService = true)
class CryptoModuleTest {
@Suppress("unused")
@MiskTestModule
val module = CryptoTestModule()

This comment has been minimized.

Copy link
@jjestrel

jjestrel Jul 28, 2019

Author Collaborator

This test was broken for injection the whole time

@@ -37,7 +37,12 @@ internal class AssertExtensionsTest {
}
""")
}).hasMessage(
"""expected:<"{ "my_structure[]" : [ "this" , 45, "...> but was:<"{ "my_structure[2]" : [ "this" , 45, "...>""")

This comment has been minimized.

Copy link
@jjestrel

jjestrel Jul 28, 2019

Author Collaborator

These messages are different in junit5

@@ -54,4 +54,5 @@ dependencies {
testCompile dep.kotlinxCoroutines
testCompile dep.mockitoCore
testCompile project(':misk-testing')
testImplementation dep.junit4

This comment has been minimized.

Copy link
@jjestrel

jjestrel Jul 28, 2019

Author Collaborator

implementation so we don't leak this dependency transitively

@jjestrel jjestrel force-pushed the jayestrella/20190727-exclude-junit4 branch from 929f24c to b811831 Jul 28, 2019

@jjestrel jjestrel merged commit 6142244 into master Jul 28, 2019

2 checks passed

ci/circleci: java Your tests passed on CircleCI!
Details
ci/circleci: node Your tests passed on CircleCI!
Details

@jjestrel jjestrel deleted the jayestrella/20190727-exclude-junit4 branch Jul 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.