[ https://issues.apache.org/jira/browse/HDDS-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16604721#comment-16604721 ]
Anu Engineer commented on HDDS-351: ----------------------------------- [~ajayydv] Thanks for updating the patch. I realize that I may not have been very clear in my comments. Here is how I think we should test ozoneChillModeManager. # OzoneChillModeManager is capable of listening to Events. # We have an initial state -- Make OzoneManager read the Goal states too, that is instead of querying an internal state like ContainerStateManager.count, you pass that into your class explicitly. # Now you can set up an OzoneManager more easily, with Goal states in your test case. # For example, you need to test the case where the container count is 0. Since you can initialize the OzoneManager with expected container count, it is easier to create a test. # Now you can create a case where you say, expected container count is 1. Now you can send an event from the EventQueue, which makes it easy to send a container Report. # Then you can send a container report with 2 containers, even while the cluster has only 1 container. This is a negative test case that allows you to verify the behavior of OzoneManager. Bottom Line: I think we should stop using MiniOzoneCluster for Unit Tests. We should use that only for Integration tests. This limitation makes us think more clearly about how unit tests should be written. > Add chill mode state to SCM > --------------------------- > > Key: HDDS-351 > URL: https://issues.apache.org/jira/browse/HDDS-351 > Project: Hadoop Distributed Data Store > Issue Type: Bug > Reporter: Ajay Kumar > Assignee: Ajay Kumar > Priority: Major > Fix For: 0.2.1 > > Attachments: HDDS-351.00.patch, HDDS-351.01.patch, HDDS-351.02.patch, > HDDS-351.03.patch, HDDS-351.04.patch, HDDS-351.05.patch, HDDS-351.06.patch > > > Add chill mode state to SCM -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org