Skip to content

Conversation

@slawekjaranowski
Copy link
Member

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

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY,
    where you replace MNG-XXX and SUMMARY with the appropriate JIRA issue.
  • Also format the first line of the commit message like [MNG-XXX] SUMMARY.
    Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean 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.

void downstreamProjectsSoudabehCached(boolean transitive) {
FilteredProjectDependencyGraph graph =
new FilteredProjectDependencyGraph(projectDependencyGraph, List.of(aProject));

Copy link
Contributor

@Pankraz76 Pankraz76 May 27, 2025

Choose a reason for hiding this comment

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

Suggested change
verify(projectDependencyGraph, times(0)).getDownstreamProjects(bProject, transitive);

this could be kind of increment, but not mandatory.

Copy link
Contributor

@Pankraz76 Pankraz76 left a comment

Choose a reason for hiding this comment

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

polish.


when(projectDependencyGraph.getUpstreamProjects(bProject, transitive)).thenReturn(List.of(cProject));

graph.getUpstreamProjects(bProject, transitive);
Copy link
Contributor

Choose a reason for hiding this comment

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

could pass this test by only caching first 2 calls. Making random loop would break this mutated impl.

graph.getDownstreamProjects(bProject, transitive);
graph.getDownstreamProjects(bProject, transitive);

verify(projectDependencyGraph).getDownstreamProjects(bProject, transitive);
Copy link
Contributor

Choose a reason for hiding this comment

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

This does assert that only one call is done ?

Copy link
Member Author

Choose a reason for hiding this comment

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

exactly

@slawekjaranowski slawekjaranowski requested a review from gnodet May 29, 2025 21:03
@slawekjaranowski slawekjaranowski merged commit 278b549 into apache:master Jun 4, 2025
19 checks passed
@slawekjaranowski slawekjaranowski deleted the FilteredProjectDependency-cache-test branch June 4, 2025 20:56
@github-actions github-actions bot added this to the 4.0.0-rc-4 milestone Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants