HDFS-7001. Tests in TestTracing should not depend on the order of execution. (iwasakims via cmccabe)

This commit is contained in:
Colin Patrick Mccabe 2014-09-22 17:21:58 -07:00
parent 43efdd30b5
commit 7b8df93ce1
2 changed files with 12 additions and 5 deletions

View File

@ -792,6 +792,9 @@ Release 2.6.0 - UNRELEASED
HDFS-7106. Reconfiguring DataNode volumes does not release the lock files
in removed volumes. (cnauroth via cmccabe)
HDFS-7001. Tests in TestTracing depends on the order of execution
(iwasakims via cmccabe)
BREAKDOWN OF HDFS-6134 AND HADOOP-10150 SUBTASKS AND RELATED JIRAS
HDFS-6387. HDFS CLI admin tool for creating & deleting an

View File

@ -53,13 +53,15 @@ public class TestTracing {
private static Configuration conf;
private static MiniDFSCluster cluster;
private static DistributedFileSystem dfs;
private static SpanReceiverHost spanReceiverHost;
@Test
public void testSpanReceiverHost() throws Exception {
Configuration conf = new Configuration();
conf.set(SpanReceiverHost.SPAN_RECEIVERS_CONF_KEY,
SetSpanReceiver.class.getName());
SpanReceiverHost spanReceiverHost = SpanReceiverHost.getInstance(conf);
public void testGetSpanReceiverHost() throws Exception {
Configuration c = new Configuration();
// getting instance already loaded.
c.set(SpanReceiverHost.SPAN_RECEIVERS_CONF_KEY, "");
SpanReceiverHost s = SpanReceiverHost.getInstance(c);
Assert.assertEquals(spanReceiverHost, s);
}
@Test
@ -228,8 +230,10 @@ public class TestTracing {
cluster = new MiniDFSCluster.Builder(conf)
.numDataNodes(3)
.build();
cluster.waitActive();
dfs = cluster.getFileSystem();
spanReceiverHost = SpanReceiverHost.getInstance(conf);
}
@AfterClass