Skip to content

Commit

Permalink
Merge pull request #475 from rnc/TASKENABLE
Browse files Browse the repository at this point in the history
Ignore attempts to disable GME alignment task
  • Loading branch information
rnc authored Jan 31, 2025
2 parents 1bdd008 + e837d68 commit b61d1e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public void ensureAlignmentFileCreatedAndAlignmentTaskRun()
});
});

assertThat(systemOutRule.getLog()).contains("Attempting to disable alignment task in");

// we care about how many calls are made to DA from an implementation perspective which is why we assert
verify(1, postRequestedFor(urlEqualTo("/da/rest/v-1/" + DefaultTranslator.Endpoint.LOOKUP_GAVS)));

Expand Down
3 changes: 1 addition & 2 deletions analyzer/src/functTest/resources/multi-module/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ allprojects {
}

project(':subproject1') {
project.tasks.configureEach { task -> task.enabled = false }
dependencies {
implementation group: 'org.springframework', name: 'spring-context', version: '5.1.6.RELEASE'
implementation group: 'org.hibernate', name: 'hibernate-core', version: '5.4.2.Final'
implementation gradleApi() // dependency of type DefaultSelfResolvingDependency
testImplementation group: 'junit', name: 'junit', version: '4.12'
}


}

project(':subproject1:subproject11') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1023,4 +1023,11 @@ private void processAlignmentReport(Project project, Configuration configuration
JSONUtils.jsonToString(jsonReport) + System.lineSeparator());
}
}

@Override
public void setEnabled(boolean enabled) {
// This should never be called. If it is called with true, the created task defaults to
// true so no need to call super.
logger.warn("Attempting to disable alignment task in {}; ignoring", getProject().getName());
}
}

0 comments on commit b61d1e8

Please sign in to comment.