diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockStatsMXBean.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockStatsMXBean.java index bcf38d6f7d..64364cb303 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockStatsMXBean.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockStatsMXBean.java @@ -41,8 +41,10 @@ import org.apache.hadoop.hdfs.server.datanode.DataNodeTestUtils; import org.junit.After; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; import org.eclipse.jetty.util.ajax.JSON; +import org.junit.rules.Timeout; /** * Class for testing {@link BlockStatsMXBean} implementation @@ -51,6 +53,9 @@ public class TestBlockStatsMXBean { private MiniDFSCluster cluster; + @Rule + public Timeout globalTimeout = new Timeout(300000); + @Before public void setup() throws IOException { HdfsConfiguration conf = new HdfsConfiguration();