Repository navigation
Test update-file-header on the former IT fixtures without a forked build - #830
Merged
Merged
Conversation
Base automatically changed from
agent/license-store-own-repository
to
master
November 22, 2026 17:16
slachiewicz
force-pushed
the
agent/license-header-unit
branch
from
November 22, 2026 18:26
a243b31 to
17c30c5
Compare
slachiewicz
marked this pull request as ready for review
November 22, 2026 19:41
slachiewicz
commented
Nov 22, 2026
slachiewicz
left a comment
Member
Author
There was a problem hiding this comment.
Needs a fix: the MLICENSE-44 IT asserted the header of File4.java as well as File1–3, and File4.java is carried into the new test resources, but mlicense44UsesALicenseAndTemplateFromTheProject loops over File1–3 only. Add File4 to the loop or document why it is excluded. The other eight ITs' assertions map one-for-one and the checkExists stream close is sound.
slachiewicz
force-pushed
the
agent/license-header-unit
branch
from
November 22, 2026 20:30
17c30c5 to
6dd3cf6
Compare
UpdateFileHeaderMojoTest replaces nine ITs (ISSUE-7, ISSUE-22, ISSUE-38, ISSUE-166, ISSUE-347, MLICENSE-3, -27, -30, -44) and keeps every assertion. The mojo is configured from the generated plugin descriptor, so the @parameter defaults still apply. The ITs that need a real build (lifecycle bindings with other plugins, the broad file-type matrix) stay.
LicenseRepository.checkExists left the file open after reading its length, so on Windows a project's license directory could not be deleted afterwards, which failed UpdateFileHeaderMojoTest.mlicense44 in the JUnit temp directory clean-up.
slachiewicz
force-pushed
the
agent/license-header-unit
branch
from
November 22, 2026 20:30
6dd3cf6 to
9a4acb8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #829, which lets unit tests load the license store on Java 9 and later.
UpdateFileHeaderMojoTestreplaces nine ITs (ISSUE-7, ISSUE-22, ISSUE-38, ISSUE-166, ISSUE-347, MLICENSE-3, MLICENSE-27, MLICENSE-30, MLICENSE-44) with all their assertions.MojoTestSupportconfigures the mojo from the generated plugin descriptor, so the@Parameterdefaults and property expressions apply as in a build, and the tests run from the IDE afterprocess-classes.A second commit fixes a leak the Windows build exposed:
LicenseRepository.checkExistsleft the file open after reading its content length, so the license files of a project could not be deleted afterwards.Not moved: the ITs that bind the goal next to build-helper and resources (ISSUE-135, the two copyright-format ITs),
update-file-header-test-mojo(file-type matrix) and the threeupdate-project-licenseITs.Verified:
mvn verifyon JDK 17 → 243 tests, 0 failures; each moved behavior fails when its production line is broken.