public class SparkMetricsIntegrationTestRun extends TestFrameworkTestBase {
public static final String METRICS_KEY = "system.driver.BlockManager.memory.remainingMem_MB";
@Test
public void testSparkMetrics() throws Exception {
ApplicationManager applicationManager = deployApplication(TestSparkMetricsIntegrationApp.class);
<BUG>SparkManager sparkManager = applicationManager.startSpark(TestSparkMetricsIntegrationApp.APP_SPARK_NAME);

sparkManager.waitForFinish(120, TimeUnit.SECONDS);</BUG>
Assert.assertTrue(getSparkMetric(TestSparkMetricsIntegrationApp.APP_NAME,
TestSparkMetricsIntegrationApp.APP_SPARK_NAME, METRICS_KEY) > 0);

public class SparkMetricsIntegrationTestRun extends TestFrameworkTestBase {
public static final String METRICS_KEY = "system.driver.BlockManager.memory.remainingMem_MB";
@Test
public void testSparkMetrics() throws Exception {
ApplicationManager applicationManager = deployApplication(TestSparkMetricsIntegrationApp.class);
SparkManager sparkManager = applicationManager.getSparkManager(TestSparkMetricsIntegrationApp.APP_SPARK_NAME);
sparkManager.start();
sparkManager.waitForFinish(120, TimeUnit.SECONDS);
Assert.assertTrue(getSparkMetric(TestSparkMetricsIntegrationApp.APP_NAME,
TestSparkMetricsIntegrationApp.APP_SPARK_NAME, METRICS_KEY) > 0);
