HDFS-9072. Fix random failures in TestJMXGet. (J.Andreina via stevel)

This commit is contained in:
Steve Loughran 2015-09-16 10:08:18 +01:00
parent 9eda3ce3fa
commit 1f28703d93
2 changed files with 6 additions and 0 deletions

View File

@ -1005,6 +1005,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9067. o.a.h.hdfs.server.datanode.fsdataset.impl.TestLazyWriter
is failing in trunk (Surendra Singh Lilhore via vinayakumarb)
HDFS-9072. Fix random failures in TestJMXGet.
(J.Andreina via stevel)
Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -114,10 +114,12 @@ public class TestJMXGet {
assertTrue("error printAllValues", checkPrintAllValues(jmx));
//get some data from different source
DFSTestUtil.waitForMetric(jmx, "NumLiveDataNodes", numDatanodes);
assertEquals(numDatanodes, Integer.parseInt(
jmx.getValue("NumLiveDataNodes")));
assertGauge("CorruptBlocks", Long.parseLong(jmx.getValue("CorruptBlocks")),
getMetrics("FSNamesystem"));
DFSTestUtil.waitForMetric(jmx, "NumOpenConnections", numDatanodes);
assertEquals(numDatanodes, Integer.parseInt(
jmx.getValue("NumOpenConnections")));
@ -161,6 +163,7 @@ public class TestJMXGet {
String serviceName = "DataNode";
jmx.setService(serviceName);
jmx.init();
DFSTestUtil.waitForMetric(jmx, "BytesWritten", fileSize);
assertEquals(fileSize, Integer.parseInt(jmx.getValue("BytesWritten")));
cluster.shutdown();