Open alberttwong opened 8 months ago
CLIENT: Server listening on port 63194... Received JSON data in run script Running pytest with args: ['-p', 'vscode_pytest', '--rootdir=/Users/atwong/sandbox/dbt-starrocks', '/Users/atwong/sandbox/dbt-starrocks/tests/functional/adapter/test_basic.py::TestSnapshotCheckColsMyAdapter::test_snapshot_check_cols'] ============================= test session starts ============================== platform darwin -- Python 3.9.16, pytest-8.1.1, pluggy-1.4.0 rootdir: /Users/atwong/sandbox/dbt-starrocks configfile: pytest.ini plugins: dotenv-0.5.2 collected 1 item tests/functional/adapter/test_basic.py F [100%] =================================== FAILURES =================================== ___________ TestSnapshotCheckColsMyAdapter.test_snapshot_check_cols ____________ self = <test_basic.TestSnapshotCheckColsMyAdapter object at 0x10699d2e0> project = <dbt.tests.fixtures.project.TestProjInfo object at 0x102dd6c10> def test_snapshot_check_cols(self, project): # seed command results = run_dbt(["seed"]) assert len(results) == 2 # snapshot command > results = run_dbt(["snapshot"]) /Users/atwong/dbt-env/lib/python3.9/site-packages/dbt/tests/adapter/basic/test_snapshot_check_cols.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = ['snapshot', '--project-dir', '/private/var/folders/xn/_h8gfpfs3vv_m6gkxm8t0l380000gn/T/pytest-of-atwong/pytest-94/project0', '--profiles-dir', '/private/var/folders/xn/_h8gfpfs3vv_m6gkxm8t0l380000gn/T/pytest-of-atwong/pytest-94/profile0'] expect_pass = True def run_dbt( args: Optional[List[str]] = None, expect_pass: bool = True, ): # Ignore logbook warnings warnings.filterwarnings("ignore", category=DeprecationWarning, module="logbook") # reset global vars reset_metadata_vars() # The logger will complain about already being initialized if # we don't do this. log_manager.reset_handlers() if args is None: args = ["run"] print("\n\nInvoking dbt with {}".format(args)) from dbt.flags import get_flags flags = get_flags() project_dir = getattr(flags, "PROJECT_DIR", None) profiles_dir = getattr(flags, "PROFILES_DIR", None) if project_dir and "--project-dir" not in args: args.extend(["--project-dir", project_dir]) if profiles_dir and "--profiles-dir" not in args: args.extend(["--profiles-dir", profiles_dir]) dbt = dbtRunner() res = dbt.invoke(args) # the exception is immediately raised to be caught in tests # using a pattern like `with pytest.raises(SomeException):` if res.exception is not None: raise res.exception if expect_pass is not None: > assert res.success == expect_pass, "dbt exit state did not match expected" E AssertionError: dbt exit state did not match expected /Users/atwong/dbt-env/lib/python3.9/site-packages/dbt/tests/util.py:108: AssertionError ---------------------------- Captured stdout setup ----------------------------- === Test project_root: /private/var/folders/xn/_h8gfpfs3vv_m6gkxm8t0l380000gn/T/pytest-of-atwong/pytest-94/project0 ----------------------------- Captured stdout call ----------------------------- Invoking dbt with ['seed'] 22:52:25 Running with dbt=1.6.2 22:52:25 Registered adapter: starrocks=1.4.2 22:52:25 Unable to do partial parsing because saved manifest not found. Starting full parse. 22:52:25 Found 3 snapshots, 2 seeds, 0 sources, 0 exposures, 0 metrics, 335 macros, 0 groups, 0 semantic models 22:52:25 22:52:25 Concurrency: 1 threads (target='default') 22:52:25 22:52:25 1 of 2 START seed file test17102839453554581547_test_basic.added ............... [RUN] 22:52:25 1 of 2 OK loaded seed file test17102839453554581547_test_basic.added ........... [INSERT 20 in 0.27s] 22:52:25 2 of 2 START seed file test17102839453554581547_test_basic.base ................ [RUN] 22:52:26 2 of 2 OK loaded seed file test17102839453554581547_test_basic.base ............ [INSERT 10 in 0.20s] 22:52:26 22:52:26 Finished running 2 seeds in 0 hours 0 minutes and 0.53 seconds (0.53s). 22:52:26 22:52:26 Completed successfully 22:52:26 22:52:26 Done. PASS=2 WARN=0 ERROR=0 SKIP=0 TOTAL=2 Invoking dbt with ['snapshot'] 22:52:26 Running with dbt=1.6.2 22:52:26 Registered adapter: starrocks=1.4.2 22:52:26 Found 3 snapshots, 2 seeds, 0 sources, 0 exposures, 0 metrics, 335 macros, 0 groups, 0 semantic models 22:52:26 22:52:26 Concurrency: 1 threads (target='default') 22:52:26 22:52:26 1 of 3 START snapshot test17102839453554581547_test_basic.cc_all_snapshot ...... [RUN] 22:52:26 1 of 3 ERROR snapshotting test17102839453554581547_test_basic.cc_all_snapshot .. [ERROR in 0.05s] 22:52:26 2 of 3 START snapshot test17102839453554581547_test_basic.cc_date_snapshot ..... [RUN] 22:52:26 2 of 3 ERROR snapshotting test17102839453554581547_test_basic.cc_date_snapshot . [ERROR in 0.02s] 22:52:26 3 of 3 START snapshot test17102839453554581547_test_basic.cc_name_snapshot ..... [RUN] 22:52:26 3 of 3 ERROR snapshotting test17102839453554581547_test_basic.cc_name_snapshot . [ERROR in 0.02s] 22:52:26 22:52:26 Finished running 3 snapshots in 0 hours 0 minutes and 0.12 seconds (0.12s). 22:52:26 22:52:26 Completed with 3 errors and 0 warnings: 22:52:26 22:52:26 Compilation Error in snapshot cc_all_snapshot (snapshots/cc_all_snapshot.sql) macro 'dbt_macro__snapshot_check_all_get_existing_columns' takes not more than 2 argument(s) > in macro snapshot_check_strategy (macros/materializations/snapshots/strategies.sql) > called by macro materialization_snapshot_starrocks (macros/materializations/snapshot/snapshot.sql) > called by snapshot cc_all_snapshot (snapshots/cc_all_snapshot.sql) 22:52:26 22:52:26 Compilation Error in snapshot cc_date_snapshot (snapshots/cc_date_snapshot.sql) macro 'dbt_macro__snapshot_check_all_get_existing_columns' takes not more than 2 argument(s) > in macro snapshot_check_strategy (macros/materializations/snapshots/strategies.sql) > called by macro materialization_snapshot_starrocks (macros/materializations/snapshot/snapshot.sql) > called by snapshot cc_date_snapshot (snapshots/cc_date_snapshot.sql) 22:52:26 22:52:26 Compilation Error in snapshot cc_name_snapshot (snapshots/cc_name_snapshot.sql) macro 'dbt_macro__snapshot_check_all_get_existing_columns' takes not more than 2 argument(s) > in macro snapshot_check_strategy (macros/materializations/snapshots/strategies.sql) > called by macro materialization_snapshot_starrocks (macros/materializations/snapshot/snapshot.sql) > called by snapshot cc_name_snapshot (snapshots/cc_name_snapshot.sql) 22:52:26 22:52:26 Done. PASS=0 WARN=0 ERROR=3 SKIP=0 TOTAL=3 =========================== short test summary info ============================ FAILED tests/functional/adapter/test_basic.py::TestSnapshotCheckColsMyAdapter::test_snapshot_check_cols ============================== 1 failed in 1.60s =============================== Finished running tests!