Stephen O'Donnell created HDDS-9877:
---------------------------------------

             Summary: ReplicationManager: Create a data drive test framework to 
cover similar test scenarios
                 Key: HDDS-9877
                 URL: https://issues.apache.org/jira/browse/HDDS-9877
             Project: Apache Ozone
          Issue Type: Bug
          Components: test
            Reporter: Stephen O'Donnell
            Assignee: Stephen O'Donnell


This change added a new test class called TestReplicationManagerScenarios. It 
work via test definitions in JSON, such as:

{code}
  { "description": "Perfect Replication Ratis", "containerState": "CLOSED", 
"replicationConfig": "RATIS:THREE", "sequenceId": 12,
    "replicas": [
        { "state": "CLOSED", "index": 0, "datanode": "d1", "sequenceId": 0, 
"isEmpty": false, "origin": "o1"},
        { "state": "CLOSED", "index": 0, "datanode": "d2", "sequenceId": 0, 
"isEmpty": false, "origin": "o2"},
        { "state": "CLOSED", "index": 0, "datanode": "d3", "sequenceId": 0, 
"isEmpty": false, "origin": "o3"}
    ],
    "expectation": {},
    "commands": []
  }
{code}

Which defines the container state and the replica states, along with expected 
commands and outputs from processing the container.

For each scenario, it runs through the Replication Manager check phase, re-runs 
the check-phase in read only mode and also runs the processing phase, where RM 
will send commands to fix the problems.

There are also some tests added to prove the framework is working, but further 
Jira's would allow us to expand the test scenarios and remove many similar unit 
tests that are harder to understand.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to