Skip to content

Minor fixes for integration tests - #12871

Merged
elharo merged 4 commits into
apache:masterfrom
fridrich:master
Aug 28, 2026
Merged

Minor fixes for integration tests#12871
elharo merged 4 commits into
apache:masterfrom
fridrich:master

Conversation

@fridrich

Copy link
Copy Markdown
Contributor

This fixes integration tests 1) with openSUSE OpenJDK versions and 2) one test where error message has additional metadata after the url).

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@fridrich
fridrich force-pushed the master branch 2 times, most recently from a33729f to ea0ae15 Compare August 27, 2026 20:23
@fridrich

Copy link
Copy Markdown
Contributor Author

BTW, there are two files mng-8572-di-type-handler/test/settings.xml and mng-3259/settings.xml that define bogus <localRepository>, but those two files are never actually passed via --settings in their respective tests. They are dead weight and I only noticed them because I was grepping for the "proper" way to fix the stray repository problem in mng-3955 test. I did not remove them because they don't harm anything, but just mentioning it here.

Some distributions patch the doclint defaults in OpenJDK, so
that don't have to fix hundreds of upstream packages with
broken javadoc. So, specify the -Ddoclint=all and don't assume
globally valid default.
@fridrich

Copy link
Copy Markdown
Contributor Author

This would be clearly back-portable to 4.0.x, is there a way for you to do it, or should I eventually create a new PR for that?

@elharo elharo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please file an issue to remove the dead files you found or just send a PR. Thanks.

@fridrich

Copy link
Copy Markdown
Contributor Author

Please file an issue to remove the dead files you found or just send a PR. Thanks.

#12887

@fridrich
fridrich requested a review from elharo August 28, 2026 12:33

@elharo elharo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is weird that this one is failing just on your system. I need to dig into it in more detail,. It could be that the change is not where you've made the change. It might be that a different line is omitted from your output completely and this asks the verifier to check a different line. I want to be cautious about this one until we understand it fully.

@fridrich

Copy link
Copy Markdown
Contributor Author

log_host.txt

@fridrich

fridrich commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

So, the difference is that in the container, there is a cached failure of resolution and in the host machine there is a actual re-download attempt. There are now two possibilities, either we leave my fix, or add verifier.addCliArgument("-U"); to override the caching for this test. And then we can leave that string untouched

I run it in the container with the "-U" and it passed with the original string. Tell me what is preferable.

@fridrich

Copy link
Copy Markdown
Contributor Author

It boils to the difference between messages in the situation when things are cached and when they are not:
-[ERROR] Non-resolvable parent POM: The following artifacts could not be resolved: org.apache:apache:pom:33 (absent): org.apache:apache:pom:33 was not found in https://repo1.maven.org during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced (remote repositories: central (https://repo1.maven.org, default, releases)) and parent could not be found in reactor @ org.apache.maven.its.it0043:maven-it-it0043:1.0-SNAPSHOT, file:///home/fstrba/devel-cvs/fridrich-maven/its/core-it-suite/target/test-classes/mng-8181-central-repo/pom.xml, line 23, column 3: One or more requests failed -org.apache.maven.api.services.model.ModelResolverException: The following artifacts could not be resolved: org.apache:apache:pom:33 (absent): org.apache:apache:pom:33 was not found in https://repo1.maven.org during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced (remote repositories: central (https://repo1.maven.org, default, releases)) +[ERROR] Non-resolvable parent POM: The following artifacts could not be resolved: org.apache:apache:pom:33 (absent): Could not find artifact org.apache:apache:pom:33 in central (https://repo1.maven.org) (remote repositories: central (https://repo1.maven.org, default, releases)) and parent could not be found in reactor @ org.apache.maven.its.it0043:maven-it-it0043:1.0-SNAPSHOT, file:///home/fstrba/devel-cvs/fridrich-maven/its/core-it-suite/target/test-classes/mng-8181-central-repo/pom.xml, line 23, column 3: One or more requests failed +org.apache.maven.api.services.model.ModelResolverException: The following artifacts could not be resolved: org.apache:apache:pom:33 (absent): Could not find artifact org.apache:apache:pom:33 in central (https://repo1.maven.org) (remote repositories: central (https://repo1.maven.org, default, releases))

@fridrich
fridrich requested a review from elharo August 28, 2026 14:10
The difference of builds with caching
[ERROR]     Non-resolvable parent POM: The following artifacts could not
 be resolved: org.apache:apache:pom:33 (absent): org.apache:apache:pom:33
 was not found in https://repo1.maven.org during a previous attempt. This
 failure was cached in the local repository and resolution is not
 reattempted until the update interval of central has elapsed or updates
 are forced (remote repositories: central (https://repo1.maven.org,
 default, releases)) and parent could not be found in reactor @
 org.apache.maven.its.it0043:maven-it-it0043:1.0-SNAPSHOT,
 file:///.../its/core-it-suite/target/test-classes/mng-8181-central-repo/pom.xml,
 line 23, column 3: One or more requests failed
org.apache.maven.api.services.model.ModelResolverException: The following
 artifacts could not be resolved: org.apache:apache:pom:33 (absent):
 org.apache:apache:pom:33 was not found in https://repo1.maven.org during
 a previous attempt. This failure was cached in the local repository and
 resolution is not reattempted until the update interval of central has
 elapsed or updates are forced (remote repositories: central
 (https://repo1.maven.org, default, releases))

and without caching

[ERROR]     Non-resolvable parent POM: The following artifacts could not
 be resolved: org.apache:apache:pom:33 (absent): Could not find artifact
 org.apache:apache:pom:33 in central (https://repo1.maven.org) (remote
 repositories: central (https://repo1.maven.org, default, releases)) and
 parent could not be found in reactor @
 org.apache.maven.its.it0043:maven-it-it0043:1.0-SNAPSHOT,
 file:///.../its/core-it-suite/target/test-classes/mng-8181-central-repo/pom.xml,
 line 23, column 3: One or more requests failed
org.apache.maven.api.services.model.ModelResolverException: The following
 artifacts could not be resolved: org.apache:apache:pom:33 (absent):
 Could not find artifact org.apache:apache:pom:33 in central
 (https://repo1.maven.org) (remote repositories: central
 (https://repo1.maven.org, default, releases))

We are trying to match string that is not present ever when the failure is
cached. The closest is the string
    "central (https://repo1.maven.org, default, releases)"

So, for this test, force downloading even if the system preference is caching.
@fridrich

Copy link
Copy Markdown
Contributor Author

I gave it a thought and the -U option is exactly maven's way to deal with caching when one wants to redownload anyway. This then only happens in caching setting and if the tests are running twice without cleaning. With this one, one can run the tests as much as one wants and they will still do what they have to do.

@elharo elharo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, thanks for the investigation

@elharo
elharo merged commit e53b7bd into apache:master Aug 28, 2026
22 checks passed
@github-actions github-actions Bot added this to the 4.1.0 milestone Aug 28, 2026
@github-actions

Copy link
Copy Markdown

@elharo Please assign appropriate label to PR according to the type of change.

@elharo elharo added the skip-changelog Skip this PR from automatically changelog generation label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Skip this PR from automatically changelog generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants