Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-1791. Update network-tests/src/test/blockade/README.md file #1083

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -16,45 +16,27 @@
Following python packages need to be installed before running the tests :

1. blockade
2. pytest==2.8.7
2. pytest==3.2.0

Running test as part of the maven build:

mvn clean verify -Pit

Running test as part of the released binary:

You can execute all blockade tests with following command-lines:

```
cd $DIRECTORY_OF_OZONE
python -m pytest -s tests/blockade/
mvn clean verify -Pit
```

You can also execute fewer blockade tests with following command-lines:

```
cd $DIRECTORY_OF_OZONE
python -m pytest -s tests/blockade/<PATH_TO_PYTHON_FILE>
e.g: python -m pytest -s tests/blockade/test_blockade_datanode_isolation.py
```
Running test as part of the released binary:

You can change the default 'sleep' interval in the tests with following
command-lines:
You can execute all blockade tests with following command:

```
cd $DIRECTORY_OF_OZONE
python -m pytest -s tests/blockade/ --containerStatusSleep=<SECONDS>

e.g: python -m pytest -s tests/blockade/ --containerStatusSleep=720
cd $OZONE_HOME
python -m pytest tests/blockade
```

By default, second phase of the tests will not be run.
In order to run the second phase of the tests, you can run following
command-lines:

```
cd $DIRECTORY_OF_OZONE
python -m pytest -s tests/blockade/ --runSecondPhase=true
You can also execute specific blockade tests with following command:

```
cd $OZONE_HOME
python -m pytest tests/blockade/< PATH TO PYTHON FILE >
e.g: python -m pytest tests/blockade/test_blockade_datanode_isolation.py
```
Expand Up @@ -154,17 +154,20 @@ public void testOpenContainerIntegrity() throws Exception {
Assert.assertTrue(cs.containerCount() > 0);

// delete the chunks directory.
File chunksDir = new File(c.getContainerData().getContainerPath(), "chunks");
File chunksDir = new File(c.getContainerData().getContainerPath(),
"chunks");
deleteDirectory(chunksDir);
Assert.assertFalse(chunksDir.exists());

ContainerScrubber sb = new ContainerScrubber(ozoneConfig, oc.getController());
ContainerScrubber sb = new ContainerScrubber(ozoneConfig,
oc.getController());
sb.scrub(c);

// wait for the incremental container report to propagate to SCM
Thread.sleep(5000);

ContainerManager cm = cluster.getStorageContainerManager().getContainerManager();
ContainerManager cm = cluster.getStorageContainerManager()
.getContainerManager();
Set<ContainerReplica> replicas = cm.getContainerReplicas(
ContainerID.valueof(c.getContainerData().getContainerID()));
Assert.assertEquals(1, replicas.size());
Expand All @@ -184,7 +187,8 @@ boolean deleteDirectory(File directoryToBeDeleted) {
}

private boolean verifyRatisReplication(String volumeName, String bucketName,
String keyName, ReplicationType type, ReplicationFactor factor)
String keyName, ReplicationType type,
ReplicationFactor factor)
throws IOException {
OmKeyArgs keyArgs = new OmKeyArgs.Builder()
.setVolumeName(volumeName)
Expand Down