[
https://issues.apache.org/jira/browse/GEODE-9595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kirk Lund updated GEODE-9595:
-----------------------------
Description:
I found circular classpath dependencies in the testing targets. This results in
modules such as geode-core adding geode-core*.jar to the classpath of the
tests. Classes and resources are then available to the test JVM via the .jar
file as well as the filesystem.
Some debugging revealed that tests in affected modules end up loading classes
and resources into testing JVMs from the .jar file instead of the filesystem,
while other modules load them from the filesystem.
One workaround is to force the filesystem main output earlier in the classpath
but the underlying problem still remains.
Workaround in patch form:
{noformat}
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 9e31f564b7..53cf2d7383 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -69,6 +69,13 @@ dependencies {
// Dependencies should be explicit in the relevant build.gradle files to
keep our modules
// as decoupled as possible.
+ acceptanceTestImplementation(sourceSets.main.output)
+ integrationTestImplementation(sourceSets.main.output)
+ distributedTestImplementation(sourceSets.main.output)
+ performanceTestImplementation(sourceSets.main.output)
+ uiTestImplementation(sourceSets.main.output)
+ upgradeTestImplementation(sourceSets.main.output)
+
// This 'apt' configuration to be removed by GEODE-5606.
apt files("${rootProject.projectDir}/buildSrc/build/libs/buildSrc.jar")
apt('junit:junit:' + DependencyConstraints.get('junit.version')) {
{noformat}
was:
I found circular classpath dependencies in the testing targets. This results in
modules such as geode-core adding geode-core*.jar to the classpath of the
tests. Classes and resources are then available to the test JVM via the .jar
file as well as the filesystem.
Some debugging revealed that tests in affected modules end up loading classes
and resources into testing JVMs from the .jar file instead of the filesystem,
while other modules load them from the filesystem.
> Testing target classpaths may include multiple copies of build output
> ---------------------------------------------------------------------
>
> Key: GEODE-9595
> URL: https://issues.apache.org/jira/browse/GEODE-9595
> Project: Geode
> Issue Type: Bug
> Components: build
> Reporter: Kirk Lund
> Assignee: Robert Houghton
> Priority: Major
> Labels: pull-request-available
>
> I found circular classpath dependencies in the testing targets. This results
> in modules such as geode-core adding geode-core*.jar to the classpath of the
> tests. Classes and resources are then available to the test JVM via the .jar
> file as well as the filesystem.
> Some debugging revealed that tests in affected modules end up loading classes
> and resources into testing JVMs from the .jar file instead of the filesystem,
> while other modules load them from the filesystem.
> One workaround is to force the filesystem main output earlier in the
> classpath but the underlying problem still remains.
> Workaround in patch form:
> {noformat}
> diff --git a/gradle/test.gradle b/gradle/test.gradle
> index 9e31f564b7..53cf2d7383 100644
> --- a/gradle/test.gradle
> +++ b/gradle/test.gradle
> @@ -69,6 +69,13 @@ dependencies {
> // Dependencies should be explicit in the relevant build.gradle files to
> keep our modules
> // as decoupled as possible.
>
> + acceptanceTestImplementation(sourceSets.main.output)
> + integrationTestImplementation(sourceSets.main.output)
> + distributedTestImplementation(sourceSets.main.output)
> + performanceTestImplementation(sourceSets.main.output)
> + uiTestImplementation(sourceSets.main.output)
> + upgradeTestImplementation(sourceSets.main.output)
> +
> // This 'apt' configuration to be removed by GEODE-5606.
> apt files("${rootProject.projectDir}/buildSrc/build/libs/buildSrc.jar")
> apt('junit:junit:' + DependencyConstraints.get('junit.version')) {
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)