snazy commented on code in PR #2275: URL: https://github.com/apache/polaris/pull/2275#discussion_r2256744109
########## build-logic/src/main/kotlin/polaris-java.gradle.kts: ########## @@ -153,18 +155,22 @@ dependencies { GradleException("assertj-core not declared in libs.versions.toml") } ) - testFixturesImplementation( + val mockitoCoreLib = libs.findLibrary("mockito-core").orElseThrow { GradleException("mockito-core not declared in libs.versions.toml") } - ) + + testFixturesImplementation(mockitoCoreLib) + + mockitoAgent(mockitoCoreLib) { isTransitive = false } } tasks.withType<Test>().configureEach { systemProperty("file.encoding", "UTF-8") systemProperty("user.language", "en") systemProperty("user.country", "US") systemProperty("user.variant", "") + jvmArgs("-javaagent:${mockitoAgent.asPath}") Review Comment: Should use this to let the system specific path not pollute the build cache. ```suggestion jvmArgumentProviders.add( CommandLineArgumentProvider { listOf("-javaagent:${mockitoAgent.asPath}") }) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org