Source:
public void testUpdateClusterCommands() throws Exception { FalconCLI.OUT.set(stream); String filePath; TestContext context = new TestContext(); Map<String, String> overlay = context.getUniqueOverlay(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -submit -type cluster -file " + filePath), 0); context.setCluster(overlay.get("cluster")); Assert.assertEquals(stream.buffer.toString().trim(), "falcon/default/Submit successful (cluster) " + context.getClusterName()); filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay); Assert.assertEquals(executeWithURL("entity -submit -type feed -file " + filePath), 0); filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE2, overlay); Assert.assertEquals(executeWithURL("entity -submit -type feed -file " + filePath), 0); filePath = TestContext.overlayParametersOverTemplate(TestContext.PROCESS_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -submit -type process -file " + filePath), 0); initSafemode(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_UPDATED_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -update -type cluster -file " + filePath + " -name " + overlay.get("cluster")), 0); clearSafemode(); Assert.assertEquals(executeWithURL("entity -updateClusterDependents -cluster " + overlay.get("cluster") + " -skipDryRun "), 0); initSafemode(); overlay = context.getUniqueOverlay(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_UPDATED_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -update -type cluster -file " + filePath + " -name " + overlay.get("cluster")), -1); clearSafemode(); }

Target:
public void testUpdateClusterCommands() throws Exception { FalconCLI.OUT.set(stream); String filePath; overlay = context.getUniqueOverlay(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -submit -type cluster -file " + filePath), 0); context.setCluster(overlay.get("cluster")); Assert.assertEquals(stream.buffer.toString().trim(), "falcon/default/Submit successful (cluster) " + context.getClusterName()); filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay); Assert.assertEquals(executeWithURL("entity -submit -type feed -file " + filePath), 0); filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE2, overlay); Assert.assertEquals(executeWithURL("entity -submit -type feed -file " + filePath), 0); filePath = TestContext.overlayParametersOverTemplate(TestContext.PROCESS_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -submit -type process -file " + filePath), 0); initSafemode(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_UPDATED_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -update -type cluster -file " + filePath + " -name " + overlay.get("cluster")), 0); clearSafemode(); Assert.assertEquals(executeWithURL("entity -updateClusterDependents -cluster " + overlay.get("cluster") + " -skipDryRun "), 0); initSafemode(); overlay = context.getUniqueOverlay(); filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_UPDATED_TEMPLATE, overlay); Assert.assertEquals(executeWithURL("entity -update -type cluster -file " + filePath + " -name " + overlay.get("cluster")), -1); clearSafemode(); }