Copilot commented on code in PR #62341:
URL: https://github.com/apache/doris/pull/62341#discussion_r3063433860
##########
regression-test/suites/export_p2/test_export_max_file_size.groovy:
##########
@@ -135,7 +135,9 @@ suite("test_export_max_file_size", "p2,external") {
def outfile_info = waiting_export.call(uuid)
def json = parseJson(outfile_info)
assert json instanceof List
- assertEquals("25", json.fileNumber[0][0])
+ def fileNum = Integer.parseInt(json.fileNumber[0][0])
+ assertTrue(fileNum > 1, "Export with max_file_size should produce
multiple files, but got ${fileNum}")
Review Comment:
`assertTrue` in JUnit-style assertions typically takes `(String message,
boolean condition)`, but the call here uses `(boolean, String)`, which can
either fail to compile or call an unintended overload depending on what
`assertTrue` is in scope. Swap the argument order (or use Groovy’s `assert
fileNum > 1 : "..."`) so the message is actually used and the assertion behaves
correctly.
```suggestion
assertTrue("Export with max_file_size should produce multiple
files, but got ${fileNum}", fileNum > 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]