Assert.assertEquals(100L, result.get(streamName + ":testing").longValue());
RuntimeMetrics procedureMetrics = RuntimeStats.getProcedureMetrics("WordCountApp", "WordFrequency");
procedureMetrics.waitForProcessed(1, 5, TimeUnit.SECONDS);
Assert.assertEquals(0L, procedureMetrics.getException());
MapReduceManager mrManager = applicationManager.startMapReduce("countTotal");
<BUG>mrManager.waitForFinish(180L, TimeUnit.SECONDS);
</BUG>
long totalCount = Long.valueOf(procedureClient.query("total", Collections.<String, String>emptyMap()));
Assert.assertEquals(5 * 100L, totalCount);
mrManager = applicationManager.startMapReduce("countFromStream");

Assert.assertEquals(100L, result.get(streamName + ":testing").longValue());
RuntimeMetrics procedureMetrics = RuntimeStats.getProcedureMetrics("WordCountApp", "WordFrequency");
procedureMetrics.waitForProcessed(1, 5, TimeUnit.SECONDS);
Assert.assertEquals(0L, procedureMetrics.getException());
MapReduceManager mrManager = applicationManager.startMapReduce("countTotal");
mrManager.waitForFinish(1800L, TimeUnit.SECONDS);
long totalCount = Long.valueOf(procedureClient.query("total", Collections.<String, String>emptyMap()));
Assert.assertEquals(5 * 100L, totalCount);
mrManager = applicationManager.startMapReduce("countFromStream");
