github-code-scanning[bot] commented on code in PR #12328:
URL: https://github.com/apache/dolphinscheduler/pull/12328#discussion_r993009602
##########
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/upgrade/WorkerGroupDaoTest.java:
##########
@@ -47,14 +45,15 @@
Map<Integer, String> workerGroupMap =
workerGroupDao.queryAllOldWorkerGroup(dataSource.getConnection());
- assertThat(workerGroupMap.size(), greaterThanOrEqualTo(0));
+ Assertions.assertTrue(workerGroupMap.size() >= 0);
Review Comment:
## Useless comparison test
Test is always true.
[Show more
details](https://github.com/apache/dolphinscheduler/security/code-scanning/1707)
##########
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/upgrade/WorkerGroupDaoTest.java:
##########
@@ -47,14 +45,15 @@
Map<Integer, String> workerGroupMap =
workerGroupDao.queryAllOldWorkerGroup(dataSource.getConnection());
- assertThat(workerGroupMap.size(), greaterThanOrEqualTo(0));
+ Assertions.assertTrue(workerGroupMap.size() >= 0);
Review Comment:
## Container size compared to zero
This expression is always true, since a map can never have negative size.
[Show more
details](https://github.com/apache/dolphinscheduler/security/code-scanning/1708)
--
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]