Package com.asakusafw.testdriver

Examples of com.asakusafw.testdriver.JobExecutor.execute()


            }
        });

        JobExecutor executor = new InProcessJobExecutor(context);
        try {
            executor.execute(job(MockHadoopJob.class.getName()), Collections.<String, String>emptyMap());
        } catch (IOException e) {
            throw new AssertionError(e);
        }
        assertThat(call.get(), is(true));
    }
View Full Code Here


        TestExecutionPlan.Job job = job(MockHadoopJob.class.getName(), "com.example.testing", "true");

        JobExecutor executor = new InProcessJobExecutor(context);
        try {
            executor.execute(job, Collections.<String, String>emptyMap());
        } catch (IOException e) {
            throw new AssertionError(e);
        }
        assertThat(call.get(), is(true));
    }
View Full Code Here

        });

        JobExecutor executor = new InProcessJobExecutor(context);
        deploy("dummy.xml", new File(framework.getHome(), InProcessJobExecutor.PATH_ASAKUSA_RESOURCES));
        try {
            executor.execute(job(MockHadoopJob.class.getName()), Collections.<String, String>emptyMap());
        } catch (IOException e) {
            throw new AssertionError(e);
        }
        assertThat(call.get(), is(true));
    }
View Full Code Here

            }
        });

        JobExecutor executor = new InProcessJobExecutor(context);
        try {
            executor.execute(job(MockHadoopJob.class.getName()), Collections.<String, String>emptyMap());
            throw new IOException();
        } catch (IOException e) {
            throw new AssertionError(e);
        } catch (AssertionError e) {
            // ok.
View Full Code Here

            }
        });

        JobExecutor executor = new InProcessJobExecutor(context);
        try {
            executor.execute(job(MockHadoopJob.class.getName()), Collections.<String, String>emptyMap());
            throw new IOException();
        } catch (IOException e) {
            throw new AssertionError(e);
        } catch (AssertionError e) {
            // ok.
View Full Code Here

                assertThat(args, contains("hello", "world"));
            }
        });
        JobExecutor executor = new InProcessJobExecutor(context);
        try {
            executor.execute(command("mock", "hello", "world"), Collections.<String, String>emptyMap());
        } catch (IOException e) {
            throw new AssertionError(e);
        }
        assertThat(call.get(), is(true));
    }
View Full Code Here

                throw new IOException();
            }
        });
        JobExecutor executor = new InProcessJobExecutor(context);
        try {
            executor.execute(command("mock"), Collections.<String, String>emptyMap());
            throw new IllegalStateException();
        } catch (IOException e) {
            // ok.
        } catch (AssertionError e) {
            // ok.
View Full Code Here

                throw new InterruptedException();
            }
        });
        JobExecutor executor = new InProcessJobExecutor(context);
        try {
            executor.execute(command("mock"), Collections.<String, String>emptyMap());
            throw new IllegalStateException();
        } catch (IOException e) {
            // ok.
        } catch (AssertionError e) {
            // ok.
View Full Code Here

        // exec: touch .../target
        TestExecutionPlan.Command command = command("generic", touch.getPath(), target.getAbsolutePath());
        JobExecutor executor = new InProcessJobExecutor(context);
        try {
            executor.execute(command, Collections.<String, String>emptyMap());
        } catch (IOException e) {
            throw new AssertionError(e);
        }
        assertThat(target.exists(), is(true));
        assertThat(call.get(), is(false));
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.