gnodet commented on PR #281:
URL: https://github.com/apache/maven/pull/281#issuecomment-7370902778
## Test Method Issues
The new test methods in `RepositoryUtilsTest.java` are not currently being
executed:
1.
`testToArtifactsCollectionOrderedByNodeDepth(RepositoryUtils.ArtifactOrdering
ordering)`
2.
`testToArtifactsCollectionOrderedByNodeDepthWithFilter(RepositoryUtils.ArtifactOrdering
ordering)`
**Problems:**
- Both methods accept a parameter but lack `@Test` annotations
- They're never invoked, so they won't run during the build
**Suggested fixes:**
1. Use `@ParameterizedTest` with
`@EnumSource(RepositoryUtils.ArtifactOrdering.class)` to test both DFS and BFS
orderings
2. Or create separate `@Test` methods for each ordering (remove parameters
and set the ordering explicitly in each test)
Example using parameterized tests:
```java
@ParameterizedTest
@EnumSource(RepositoryUtils.ArtifactOrdering.class)
void
testToArtifactsCollectionOrderedByNodeDepth(RepositoryUtils.ArtifactOrdering
ordering) {
RepositoryUtils.setArtifactOrdering(ordering);
// ... rest of test
}
```
---
_Claude Code on behalf of Guillaume Nodet_
--
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]