diff --git a/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_microbatch.py b/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_microbatch.py index 55610fb5..a558d965 100644 --- a/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_microbatch.py +++ b/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_microbatch.py @@ -61,6 +61,7 @@ def assert_row_count(self, project, relation_name: str, expected_row_count: int) assert len(result) == expected_row_count, f"{relation_name}:{pformat(result)}" +class TestMicrobatchOn(BaseMicrobatch): @pytest.fixture(scope="class") def project_config_update(self): return { @@ -99,3 +100,19 @@ def test_run_with_event_time(self, project, insert_two_rows_sql): with patch_microbatch_end_time("2020-01-05 14:57:00"): run_dbt(["run", "--select", "microbatch_model"]) self.assert_row_count(project, "microbatch_model", 5) + +class TestMicrobatchOff(BaseMicrobatch): + @pytest.fixture(scope="class") + def project_config_update(self): + return { + "flags": { + "require_builtin_microbatch_strategy": False, + } + } + + def test_run_with_event_time(self, project): + with patch_microbatch_end_time("2020-01-03 13:57:00"): + result = run_dbt(["run"]) + breakpoint() + self.assert_row_count(project, "microbatch_model", 3) +