Package com.asakusafw.compiler.testing

Examples of com.asakusafw.compiler.testing.BatchInfo


     * 単純なバッチ。
     * @throws Exception テストに失敗した場合
     */
    @Test
    public void simple() throws Exception {
        BatchInfo info = tester.compileBatch(SimpleBatch.class);
        ModelOutput<Ex1> output = tester.openOutput(Ex1.class, tester.getImporter(info, "x"));

        Ex1 ex1 = new Ex1();
        ex1.setSid(100);
        ex1.setValue(100);
View Full Code Here


     * 順序付きのバッチ。
     * @throws Exception テストに失敗した場合
     */
    @Test
    public void ordered() throws Exception {
        BatchInfo info = tester.compileBatch(OrderedBatch.class);
        ModelOutput<Ex1> output = tester.openOutput(Ex1.class, tester.getImporter(info, "first"));

        Ex1 ex1 = new Ex1();
        ex1.setValue(100);
        output.write(ex1);
View Full Code Here

     * 合流付きのバッチ。
     * @throws Exception テストに失敗した場合
     */
    @Test
    public void join() throws Exception {
        BatchInfo info = tester.compileBatch(JoinBatch.class);
        ModelOutput<Ex1> output = tester.openOutput(Ex1.class, tester.getImporter(info, "first"));

        Ex1 ex1 = new Ex1();
        ex1.setValue(100);
        output.write(ex1);
View Full Code Here

    public BatchInfo compileBatch(Class<? extends BatchDescription> description) throws IOException {
        if (description == null) {
            throw new IllegalArgumentException("description must not be null"); //$NON-NLS-1$
        }
        List<File> classPath = buildClassPath(description);
        BatchInfo info = DirectBatchCompiler.compile(
                description,
                "com.example",
                hadoopDriver.toPath(path("runtime", "batch")),
                new File("target/CompilerTester/" + testName + "/output"),
                new File("target/CompilerTester/" + testName + "/build"),
View Full Code Here

     * Simple testing.
     * @throws Exception if failed
     */
    @Test
    public void simple() throws Exception {
        BatchInfo info = tester.compileBatch(SimpleBatch.class);
        deploy(info);

        put(info, "simple", "Hello1", "Hello2", "Hello3");
        int exitCode = BatchTestRunner.execute(new String[] {
                "-b", getBatchId(info),
View Full Code Here

     * With batch arguments.
     * @throws Exception if failed
     */
    @Test
    public void arguments() throws Exception {
        BatchInfo info = tester.compileBatch(SimpleBatch.class);
        deploy(info);

        put(info, "simple", "Hello1", "Hello2", "Hello3");
        int exitCode = BatchTestRunner.execute(new String[] {
                "-b", getBatchId(info),
View Full Code Here

     * Use structured API.
     * @throws Exception if failed
     */
    @Test
    public void structured() throws Exception {
        BatchInfo info = tester.compileBatch(SimpleBatch.class);
        deploy(info);

        put(info, "simple", "Hello1", "Hello2", "Hello3");
        Map<String, String> args = new HashMap<String, String>();
        args.put("t1", "x");
View Full Code Here

     * Batch ID is not specified.
     * @throws Exception if failed
     */
    @Test
    public void no_batch_id() throws Exception {
        BatchInfo info = tester.compileBatch(SimpleBatch.class);
        deploy(info);
        int exitCode = BatchTestRunner.execute(new String[0]);
        assertThat(exitCode, is(not(0)));
    }
View Full Code Here

     * Batch is not found.
     * @throws Exception if failed
     */
    @Test
    public void missing_batch() throws Exception {
        BatchInfo info = tester.compileBatch(SimpleBatch.class);
        deploy(info);

        put(info, "simple", "Hello1");
        int exitCode = BatchTestRunner.execute(getBatchId(info) + "__MISS");
        assertThat(exitCode, is(not(0)));
View Full Code Here

     * Error occurred while executing batch app.
     * @throws Exception if failed
     */
    @Test
    public void error_batch() throws Exception {
        BatchInfo info = tester.compileBatch(SimpleBatch.class);
        deploy(info);

        put(info, "simple", "ERROR");
        int exitCode = BatchTestRunner.execute(getBatchId(info));
        assertThat(exitCode, is(not(0)));
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.testing.BatchInfo

Copyright © 2018 www.massapicom. 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.