amaliujia commented on code in PR #10471:
URL: https://github.com/apache/ozone/pull/10471#discussion_r3381074022
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/safemode/AbstractContainerSafeModeRuleTest.java:
##########
@@ -96,10 +96,6 @@ public void testRefreshInitializeContainers() {
AbstractContainerSafeModeRule rule = createRule(eventQueue, conf,
containerManager, safeModeManager);
rule.setValidateBasedOnReportProcessing(false);
assertEquals(2, rule.getTotalNumberOfContainers(), "Total number of
containers should be 2");
- containers.add(mockContainer(LifeCycleState.CLOSED, 2L));
- containers.add(mockContainer(LifeCycleState.OPEN, 3L));
- containers.add(mockContainer(LifeCycleState.CLOSED, 4L));
- containers.removeIf(c -> c.containerID().equals(ContainerID.valueOf(8L)));
Review Comment:
This reminds me a different thing:
In the previous implementation before #10462, does the `reinitializeRule`
actually wants to pull the newest container state from `containerManager`? At
least this is what the test used to verify: after the `initializeRule` and
before `reinitializeRule`, there are container changes.
#10462 actually changes the behavior to let `reinitializeRule` work on a
snapshot built from `initializeRule`
If the intention of this test case used to be testing container state
change, I think we need to revert #10462, otherwise at least we do not need
these unnecessary Mock containers any more.
--
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]