HDFS-9072. Fix random failures in TestJMXGet. (J.Andreina via stevel)
This commit is contained in:
parent
9eda3ce3fa
commit
1f28703d93
|
@ -1005,6 +1005,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
HDFS-9067. o.a.h.hdfs.server.datanode.fsdataset.impl.TestLazyWriter
|
HDFS-9067. o.a.h.hdfs.server.datanode.fsdataset.impl.TestLazyWriter
|
||||||
is failing in trunk (Surendra Singh Lilhore via vinayakumarb)
|
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
|
Release 2.7.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -114,10 +114,12 @@ public class TestJMXGet {
|
||||||
assertTrue("error printAllValues", checkPrintAllValues(jmx));
|
assertTrue("error printAllValues", checkPrintAllValues(jmx));
|
||||||
|
|
||||||
//get some data from different source
|
//get some data from different source
|
||||||
|
DFSTestUtil.waitForMetric(jmx, "NumLiveDataNodes", numDatanodes);
|
||||||
assertEquals(numDatanodes, Integer.parseInt(
|
assertEquals(numDatanodes, Integer.parseInt(
|
||||||
jmx.getValue("NumLiveDataNodes")));
|
jmx.getValue("NumLiveDataNodes")));
|
||||||
assertGauge("CorruptBlocks", Long.parseLong(jmx.getValue("CorruptBlocks")),
|
assertGauge("CorruptBlocks", Long.parseLong(jmx.getValue("CorruptBlocks")),
|
||||||
getMetrics("FSNamesystem"));
|
getMetrics("FSNamesystem"));
|
||||||
|
DFSTestUtil.waitForMetric(jmx, "NumOpenConnections", numDatanodes);
|
||||||
assertEquals(numDatanodes, Integer.parseInt(
|
assertEquals(numDatanodes, Integer.parseInt(
|
||||||
jmx.getValue("NumOpenConnections")));
|
jmx.getValue("NumOpenConnections")));
|
||||||
|
|
||||||
|
@ -161,6 +163,7 @@ public class TestJMXGet {
|
||||||
String serviceName = "DataNode";
|
String serviceName = "DataNode";
|
||||||
jmx.setService(serviceName);
|
jmx.setService(serviceName);
|
||||||
jmx.init();
|
jmx.init();
|
||||||
|
DFSTestUtil.waitForMetric(jmx, "BytesWritten", fileSize);
|
||||||
assertEquals(fileSize, Integer.parseInt(jmx.getValue("BytesWritten")));
|
assertEquals(fileSize, Integer.parseInt(jmx.getValue("BytesWritten")));
|
||||||
|
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
|
Loading…
Reference in New Issue