gnodet-bot commented on code in PR #2356:
URL: https://github.com/apache/maven-resolver/pull/2356#discussion_r4716778909


##########
maven-resolver-util/src/test/java/org/eclipse/aether/util/version/GenericVersionTest.java:
##########
@@ -36,9 +38,18 @@ protected Version newVersion(String version) {
         return new GenericVersion(version);
     }
 
-    @Test
-    void testEmptyVersion() {
-        assertOrder(X_EQ_Y, "0", "");
+    @ParameterizedTest(name = "{0}: {1} {2} {3}")
+    @CsvFileSource(resources = "/version-comparison.csv", encoding = "UTF-8", 
numLinesToSkip = 16)

Review Comment:
   🐛 **Bug: `numLinesToSkip = 16` silently drops 15 test cases.**
   
   The CSV file has 16 `#`-prefixed license header lines followed by the 
`case,left,operator,right` column header on line 17. `@CsvFileSource` delegates 
to univocity-parsers, which applies `numLinesToSkip` (via 
`setNumberOfRowsToSkip`) to **valid records** — i.e. after the `#` comment 
lines have already been filtered out. So `numLinesToSkip = 16` skips the column 
header row (1) **plus** the first 15 data rows, causing those 15 test cases to 
run silently with no assertion.
   
   Should be `numLinesToSkip = 1` (skip only the column header).
   
   ```suggestion
       @CsvFileSource(resources = "/version-comparison.csv", encoding = 
"UTF-8", numLinesToSkip = 1)
   ```



-- 
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]

Reply via email to