adoroszlai commented on code in PR #8302:
URL: https://github.com/apache/ozone/pull/8302#discussion_r2051441461
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/report/ContainerReportPublisher.java:
##########
@@ -71,7 +71,7 @@ protected long getReportFrequency() {
@SuppressWarnings("java:S2245") // no need for secure random
Review Comment:
```suggestion
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestWatchForCommit.java:
##########
@@ -282,7 +282,8 @@ public void
testWatchForCommitForRetryfailure(RaftProtos.ReplicationLevel watchT
// as well as there is no logIndex generate in Ratis.
// The basic idea here is just to test if its throws an exception.
ExecutionException e = assertThrows(ExecutionException.class,
- () -> xceiverClient.watchForCommit(index + RandomUtils.nextInt(0,
100) + 10).get());
+ () -> xceiverClient.watchForCommit(index + RandomUtils.secure().
+ randomInt(0, 100) + 10).get());
Review Comment:
```suggestion
() -> xceiverClient.watchForCommit(index +
RandomUtils.secure().randomInt(0, 100) + 10)
.get());
```
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/report/PipelineReportPublisher.java:
##########
@@ -61,7 +61,7 @@ protected long getReportFrequency() {
@SuppressWarnings("java:S2245") // no need for secure random
Review Comment:
```suggestion
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestWatchForCommit.java:
##########
@@ -382,7 +383,8 @@ public void testWatchForCommitForGroupMismatchException()
throws Exception {
// as well as there is no logIndex generate in Ratis.
// The basic idea here is just to test if its throws an exception.
final Exception e = assertThrows(Exception.class,
- () -> xceiverClient.watchForCommit(reply.getLogIndex() +
RandomUtils.nextInt(0, 100) + 10).get());
+ () -> xceiverClient.watchForCommit(reply.getLogIndex() +
RandomUtils.secure().
+ randomInt(0, 100) + 10).get());
Review Comment:
```suggestion
() -> xceiverClient.watchForCommit(reply.getLogIndex() +
RandomUtils.secure().randomInt(0, 100) + 10)
.get());
```
--
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]