test(integration): stop pinning the instance version in the OpenAPI assertion - #6653
Merged
Conversation
…ssertion
EntityDecoratorsSampleProjectIT compared the served /services/openapi document
against a literal that carried `"version":"${project.version}"` - the UNFILTERED
placeholder every stock instance used to report. #6644 made the instance report
its real build version, so the literal stopped matching, the assertion retried
for its full minute and the nightly went red on BOTH the H2 and the PostgreSQL
leg (run 31453258683) - a string comparison, hence database-independent.
Normalise `info.version` out of both sides instead of pinning it: the served
version changes on every release and every development bump, so any literal here
is a landmine that fires on the next `version set to ...` commit. Verified
locally against current master, where the instance serves 15.0.0-SNAPSHOT - so
the test now passes with a REAL version present, not because the placeholder
survived.
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.
Fixes the red nightly: run 31453258683 failed
EntityDecoratorsSampleProjectITon both the H2 and the PostgreSQL leg.What broke
The test compares the served
/services/openapidocument against a literal that carried:— the unfiltered placeholder every stock instance used to report. #6644 made an instance report its real build version, so the literal stopped matching:
The assertion sits inside a
restAssuredExecutor.execute(…, 60)retry, so instead of failing fast it retried for a full minute and surfaced asConditionTimeoutatverifyProject:33— which is why the cause was not obvious from the summary line. It is a string comparison, so it is database-independent: both legs failed identically.The fix
Normalise
info.versionout of both sides rather than pinning it. The served version changes on every release and every development bump, so any literal here is a landmine that fires on the nextversion set to …commit — this would have broken again at 14.21.0 and again at the following bump, regardless of #6644.Verification
Ran the IT locally against current master (so #6644's filtering is active) — green in 65s, and the log confirms the instance served
"version":"15.0.0-SNAPSHOT". That matters: the test now passes with a real version present, not because the placeholder happened to survive.formatter:validateclean.Note for whoever reviews: this is
@Tag("ui"), so it is not in the PR smoke gate — it only runs on the nightly and on push to master. The nightly is the gate that will confirm it.🤖 Generated with Claude Code