Package com.asakusafw.windgate.core.process

Examples of com.asakusafw.windgate.core.process.ProcessProvider.execute()


                    LOG.debug("Starting gate process: {}",
                            process.getName(),
                            sessionId);
                    try {
                        if (RuntimeContext.get().canExecute(processProvider)) {
                            processProvider.execute(drivers, process);
                        } else {
                            LOG.info("Skipped process execution (simulated)");
                        }
                    } catch (IOException e) {
                        WGLOG.error(e, "E00003",
View Full Code Here


     */
    @Test
    public void execute_simple() throws Exception {
        ProcessProfile profile = profile(2, Action.SUCCESS);
        ProcessProvider provider = profile.createProvider();
        provider.execute(factory(), script());
    }

    /**
     * retry once.
     * @throws Exception if failed
View Full Code Here

     */
    @Test
    public void execute_retry1() throws Exception {
        ProcessProfile profile = profile(2, Action.EXCEPTION, Action.SUCCESS);
        ProcessProvider provider = profile.createProvider();
        provider.execute(factory(), script());
    }

    /**
     * retry twice.
     * @throws Exception if failed
View Full Code Here

     */
    @Test
    public void execute_retry2() throws Exception {
        ProcessProfile profile = profile(2, Action.EXCEPTION, Action.EXCEPTION, Action.SUCCESS);
        ProcessProvider provider = profile.createProvider();
        provider.execute(factory(), script());
    }

    /**
     * retry over.
     * @throws Exception if failed
View Full Code Here

    @Test
    public void execute_retry_over() throws Exception {
        ProcessProfile profile = profile(2, Action.EXCEPTION, Action.EXCEPTION, Action.EXCEPTION, Action.SUCCESS);
        ProcessProvider provider = profile.createProvider();
        try {
            provider.execute(factory(), script());
            fail();
        } catch (IOException e) {
            // ok.
        }
    }
View Full Code Here

    @Test
    public void execute_interrupted() throws Exception {
        ProcessProfile profile = profile(2, Action.INTERRUPT, Action.SUCCESS);
        ProcessProvider provider = profile.createProvider();
        try {
            provider.execute(factory(), script());
            fail();
        } catch (IOException e) {
            // ok.
        }
    }
View Full Code Here

    public void execute_retry_interval() throws Exception {
        ProcessProfile profile = profile(2, 1, Action.EXCEPTION, Action.EXCEPTION, Action.SUCCESS);
        ProcessProvider provider = profile.createProvider();

        long start = System.currentTimeMillis();
        provider.execute(factory(), script());
        long end = System.currentTimeMillis();

        assertThat(end - start, is(greaterThan(1200L)));
    }
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.