Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split up test_dataflow_to_sql_plan module into more manageable components #836

Merged
merged 4 commits into from
Nov 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix generate_snapshots script
The snapshot generator script had a typo in it preventing any
non-duckdb engine from executing. It also shifted to a mark based
filter which excluded all engine-agnostic snapshots from regeneration.

Since we can rapidly execute those tests without needing an external
connection this simply runs a broader set of tests in duckdb, and
relies on the mark for our other engine tests.
tlento committed Nov 2, 2023
commit 6983ac99eb4d6f6530acb72ec2efc33c978e0783
4 changes: 2 additions & 2 deletions metricflow/test/generate_snapshots.py
Original file line number Diff line number Diff line change
@@ -121,8 +121,8 @@ def run_tests(test_configuration: MetricFlowTestConfiguration) -> None: # noqa:
os.environ["MF_SQL_ENGINE_PASSWORD"] = test_configuration.credential_set.engine_password

if test_configuration.engine is SqlEngine.DUCKDB:
# Can't use --use-persistent-source-schema with duckdb since it's in memory.
run_command(f"pytest -x -vv -n 4 --overwrite-snapshots -m '{SQL_ENGINE_SNAPSHOT_MARKER_NAME}' {TEST_DIRECTORY}")
# DuckDB is fast, so generate all snapshots, including the engine-agnostic ones
run_command(f"pytest -x -vv -n 4 --overwrite-snapshots -k 'not itest' {TEST_DIRECTORY}")
elif (
test_configuration.engine is SqlEngine.REDSHIFT
or test_configuration.engine is SqlEngine.SNOWFLAKE