Examples of TestContext


Examples of org.apache.falcon.resource.TestContext

    @Test(enabled = TEST_ENABLED)
    public void testSuspendResumeStatusEntityValidCommands() throws Exception {

        Thread.sleep(5000);
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(
                0,
                executeWithURL("entity -status -type feed -name "
                        + overlay.get("outputFeedName")));

        Assert.assertEquals(
                0,
                executeWithURL("entity -status -type process -name "
                        + overlay.get("processName")));

        Assert.assertEquals(
                0,
                executeWithURL("entity -schedule -type feed -name "
                        + overlay.get("outputFeedName")));

        Assert.assertEquals(0,
                executeWithURL("entity -schedule -type process -name "
                        + overlay.get("processName")));

        context.waitForProcessWFtoStart();

        Assert.assertEquals(
                0,
                executeWithURL("entity -suspend -type feed -name "
                        + overlay.get("outputFeedName")));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    }

    @Test(enabled = TEST_ENABLED)
    public void testDeleteEntityValidCommands() throws Exception {

        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(
                -1,
                executeWithURL("entity -delete -type cluster -name "
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    }

    @Test(enabled = TEST_ENABLED)
    public void testInvalidCLIEntitycommands() throws Exception {

        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        context.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay);
        Assert.assertEquals(-1,
                executeWithURL("entity -submit -type feed -name " + "name"));

        Assert.assertEquals(-1,
                executeWithURL("entity -schedule -type feed -file " + "name"));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

                executeWithURL("entity -schedule -type feed -file " + "name"));
    }

    @Test(enabled = TEST_ENABLED)
    public void testInstanceRunningAndStatusCommands() throws Exception {
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(0,
                executeWithURL("entity -schedule -type process -name "
                        + overlay.get("processName")));

        Assert.assertEquals(0,
                executeWithURL("entity -schedule -type feed -name "
                        + overlay.get("outputFeedName")));
        context.waitForProcessWFtoStart();

        Assert.assertEquals(0,
                executeWithURL("instance -status -type feed -name "
                        + overlay.get("outputFeedName")
                        + " -start " + START_INSTANCE));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    }

    @Test(enabled = TEST_ENABLED)
    public void testInstanceSuspendAndResume() throws Exception {
        Thread.sleep(5000);
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(0,
                executeWithURL("entity -schedule -type process -name "
                        + overlay.get("processName")));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    private static final String START_INSTANCE = "2012-04-20T00:00Z";

    @Test(enabled = TEST_ENABLED)
    public void testInstanceKillAndRerun() throws Exception {
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(0,
                executeWithURL("entity -schedule -type process -name "
                        + overlay.get("processName")));

        context.waitForProcessWFtoStart();
        Assert.assertEquals(
                0,
                executeWithURL("instance -kill -type process -name "
                        + overlay.get("processName")
                        + " -start " + START_INSTANCE + " -end " + START_INSTANCE));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

                        + createTempJobPropertiesFile()));
    }

    @Test(enabled = TEST_ENABLED)
    public void testContinue() throws Exception {
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(0,
                executeWithURL("entity -schedule -type process -name "
                        + overlay.get("processName")));

        context.waitForProcessWFtoStart();
        Assert.assertEquals(
                0,
                executeWithURL("instance -kill -type process -name "
                        + overlay.get("processName")
                        + " -start " + START_INSTANCE + " -end " + START_INSTANCE));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    }

    @Test(enabled = TEST_ENABLED)
    public void testClientProperties() throws Exception {
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(
                0,
                new FalconCLI().run(("entity -schedule -type feed -name "
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

                new FalconCLI().run("admin -stack".split("\\s")));
    }

    @Test(enabled = TEST_ENABLED)
    public void testInstanceGetLogs() throws Exception {
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(0,
                executeWithURL("entity -schedule -type process -name "
                        + overlay.get("processName")));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    @Test
    public void testSubmitAndScheduleEntityValidCommands() throws Exception {

        String filePath;
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();

        filePath = TestContext.overlayParametersOverTemplate(context.getClusterFileTemplate(), overlay);
        Assert.assertEquals(-1,
                executeWithURL("entity -submitAndSchedule -type cluster -file " + filePath));
        context.setCluster(overlay.get("cluster"));

        // this is necessary for lineage
        Assert.assertEquals(0, executeWithURL("entity -submit -type cluster -file " + filePath));
        // verify
        Assert.assertEquals(0, executeWithURL("graph -vertices -key name -value " + context.getClusterName()));

        filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay);
        Assert.assertEquals(0,
                executeWithURL("entity -submitAndSchedule -type feed -file " + filePath));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.