<commit_before>package com.nhl.link.move.itest;

import com.nhl.link.move.Execution;
import com.nhl.link.move.LmTask;
import com.nhl.link.move.runtime.task.ITaskService;
import com.nhl.link.move.unit.LmIntegrationTest;
import com.nhl.link.move.unit.LmTaskTester;
import com.nhl.link.move.unit.cayenne.t.Etl1t;
import com.nhl.link.move.unit.cayenne.t.Etl3t;
import org.junit.jupiter.api.Test;

public class CreateIT extends LmIntegrationTest {

    @Test
    public void testSync() {

        LmTask task = lmRuntime.service(ITaskService.class)
                .create(Etl1t.class)
                .sourceExtractor("com/nhl/link/move/itest/etl1_to_etl1t_upper.xml")
                .task();

        srcEtl1().insertColumns("name", "age")
                .values("a", 3)
                .values("b", null)
                .exec();

        Execution e1 = task.run();
        new LmTaskTester()
                .shouldExtract(2)
                .shouldCreate(2)
                .shouldUpdate(0)
                .shouldDelete(0)<commit_msg>Logging of execution steps and batches #202<commit_after>package com.nhl.link.move.itest;

import com.nhl.link.move.Execution;
import com.nhl.link.move.LmTask;
import com.nhl.link.move.runtime.task.ITaskService;
import com.nhl.link.move.unit.LmIntegrationTest;
import com.nhl.link.move.unit.LmTaskTester;
import com.nhl.link.move.unit.cayenne.t.Etl1t;
import com.nhl.link.move.unit.cayenne.t.Etl3t;
import org.junit.jupiter.api.Test;

public class CreateIT extends LmIntegrationTest {

    @Test
    public void testSync_MultiBatch() {

        LmTask task = lmRuntime.service(ITaskService.class)
                .create(Etl1t.class)
                .batchSize(2)
                .sourceExtractor("com/nhl/link/move/itest/etl1_to_etl1t_upper.xml")
                .task();

        srcEtl1().insertColumns("name", "age")
                .values("a", 3)
                .values("b", null)
                .values("c", 6)
                .values("d", 8)
                .values("e", 12)
                .exec();

        Execution e1 = task.run();
        new LmTaskTester()
                .shouldExtract(5)
                .shouldCreate(5)
                .shouldUpdate(0)
                .shouldDelete(0)
                .test(e1);
    }

    @Test
    public void testSync() {

        LmTask task = lmRuntime.service(ITaskService.class)
                .create(Etl1t.class)
                .sourceExtractor("com/nhl/link/move/itest/etl1_to_etl1t_upper.xml")
                .task();

        srcEtl1().insertColumns("name", "age")
                .values("a", 3)
                .values("b", null)
                .exec();

        Execution e1 = task.run();
        new LmTaskTester()
                .shouldExtract(2)
                .shouldCreate(2)
                .shouldUpdate(0)
                .shouldDelete(0)
{'fraction_non_alphanumeric': 0.12736179146256124, 'fraction_numerical': 0.015045486354093772, 'mean_word_length': 1.8334985133795838, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6985988', 'n_tokens_mistral': 993, 'n_tokens_neox': 934, 'n_words': 137}