Skip to content

Commit

Permalink
HDDS-11614. Speed up TestTransferLeadershipShell (#7370)
Browse files Browse the repository at this point in the history
  • Loading branch information
harryteng9527 authored Oct 29, 2024
1 parent 91188b3 commit 61c094f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
import org.apache.hadoop.ozone.MiniOzoneHAClusterImpl;
import org.apache.hadoop.ozone.om.OzoneManager;
import org.apache.ratis.protocol.RaftPeer;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;

import java.io.IOException;
import java.util.ArrayList;
Expand All @@ -43,6 +44,7 @@
/**
* Test transferLeadership with SCM HA setup.
*/
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class TestTransferLeadershipShell {
private MiniOzoneHAClusterImpl cluster = null;
private OzoneConfiguration conf;
Expand All @@ -58,7 +60,7 @@ public class TestTransferLeadershipShell {
*
* @throws IOException Exception
*/
@BeforeEach
@BeforeAll
public void init() throws Exception {
conf = new OzoneConfiguration();
omServiceId = "om-service-test1";
Expand All @@ -78,7 +80,7 @@ public void init() throws Exception {
/**
* Shutdown MiniDFSCluster.
*/
@AfterEach
@AfterAll
public void shutdown() {
if (cluster != null) {
cluster.shutdown();
Expand Down

0 comments on commit 61c094f

Please sign in to comment.