Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.IOException;
Expand All @@ -65,7 +65,6 @@
* Tests delete key operation with a slow follower in the datanode
* pipeline.
*/
@Ignore
public class TestContainerReplicationEndToEnd {

private static MiniOzoneCluster cluster;
Expand Down Expand Up @@ -94,10 +93,10 @@ public static void init() throws Exception {

conf.setTimeDuration(HDDS_CONTAINER_REPORT_INTERVAL,
containerReportInterval, TimeUnit.MILLISECONDS);
conf.setTimeDuration(OZONE_SCM_STALENODE_INTERVAL, containerReportInterval,
TimeUnit.MILLISECONDS);
conf.setTimeDuration(OZONE_SCM_STALENODE_INTERVAL,
5 * containerReportInterval, TimeUnit.MILLISECONDS);
conf.setTimeDuration(ScmConfigKeys.OZONE_SCM_DEADNODE_INTERVAL,
2 * containerReportInterval, TimeUnit.MILLISECONDS);
10 * containerReportInterval, TimeUnit.MILLISECONDS);
conf.setTimeDuration(OZONE_SCM_PIPELINE_DESTROY_TIMEOUT, 1000,
TimeUnit.SECONDS);
DatanodeRatisServerConfig ratisServerConfig =
Expand Down Expand Up @@ -167,9 +166,13 @@ public void testContainerReplication() throws Exception {
.getPipeline(pipelineID);
key.close();

if (cluster.getStorageContainerManager().getContainerManager()
.getContainer(new ContainerID(containerID)).getState() !=
HddsProtos.LifeCycleState.CLOSING) {
HddsProtos.LifeCycleState containerState =
cluster.getStorageContainerManager().getContainerManager()
.getContainer(new ContainerID(containerID)).getState();
LoggerFactory.getLogger(TestContainerReplicationEndToEnd.class).info(
"Current Container State is {}", containerState);
if ((containerState != HddsProtos.LifeCycleState.CLOSING) &&
(containerState != HddsProtos.LifeCycleState.CLOSED)) {
cluster.getStorageContainerManager().getContainerManager()
.updateContainerState(new ContainerID(containerID),
HddsProtos.LifeCycleEvent.FINALIZE);
Expand Down