-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic error test, fix minor merge conflict
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import pytest | ||
from dbt.tests.util import run_dbt | ||
|
||
oom_table_sql = """ | ||
SELECT a FROM system.numbers_mt GROUP BY repeat(toString(number), 100000) as a | ||
""" | ||
|
||
schema_yaml = """ | ||
version: 2 | ||
models: | ||
- name: oom_table | ||
description: Table that generates OOM | ||
config: | ||
materialized: table | ||
order_by: a | ||
""" | ||
|
||
|
||
class TestOOMError: | ||
@pytest.fixture(scope="class") | ||
def models(self): | ||
return { | ||
"schema.yml": schema_yaml, | ||
"oom_table.sql": oom_table_sql, | ||
} | ||
|
||
def test_oom(self, project): | ||
res = run_dbt(["run"], expect_pass=False) | ||
assert 'exceeded' in res.results[0].message |