efegokdemir commented on code in PR #1136:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/1136#discussion_r4174944794


##########
src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java:
##########
@@ -247,15 +250,9 @@ public void 
testCompilerProcFullRunsWhenSourcesAreUnchanged(
     
@Basedir("${basedir}/target/test-classes/unit/compiler-proc-only-explicit-incremental-test")
     public void testCompilerProcOnlyRespectsExplicitIncrementalCompilation(
             @InjectMojo(goal = "compile", pom = "plugin-config.xml") 
CompilerMojo compileMojo) {
-        Log log = mock(Log.class);
-        compileMojo.logger = log;
-        compileMojo.execute();
-
-        clearInvocations(log);
-        compileMojo.execute();
-
-        verify(log, never()).info("Nothing to compile - all classes are up to 
date.");
-        assertCompilerStubOutputFileExists(compileMojo);

Review Comment:
   The earlier end-to-end assertion ran the mojo twice with 
`incrementalCompilation=classes`. The second run’s expected log depended on the 
class-output state left by the first run (including the stub compiler output 
cleanup), so it did not isolate whether `amendincrementalCompilation()` 
preserved the explicit setting. I replaced it with a direct assertion that 
explicitly sets `incrementalCompilation` to `classes`, supplies 
`PROCESSOR_CLASSES`, and verifies the aspect set remains unchanged. I also 
removed the now-unused fixture files as requested. Validation on the current 
branch: `mvn -Denforcer.skip=true -Dspotless.check.skip=true 
-Dspotless.apply.skip=true -Dspotless.skip=true -Dcheckstyle.skip=true 
-DskipITs -Dtest=CompilerMojoTestCase test` passed (18 tests). The pushed 
commit is `cc9c788`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to