Skip to content

Commit fd75902

Browse files
Fix Postgres 63-char identifier limit: shorten parametrize IDs and remove redundant suffix
- Change parametrize IDs from 'include_detection_in_training'/'exclude_detection_from_training' to 'exclude_false'/'exclude_true' - Remove redundant suffix (_incl/_excl) since pytest parametrize IDs already differentiate test cases - New table names: test_anomaly_in_detection_period_exclude_false (44 chars) and test_anomaly_in_detection_period_exclude_true (43 chars) - Both are well under Postgres 63-character limit - Fixes CI failures on Postgres (latest_official and latest_pre) Co-Authored-By: Yosef Arbiv <[email protected]>
1 parent 370a4cb commit fd75902

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

integration_tests/tests/test_dimension_anomalies.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ def test_dimension_anomalies_with_timestamp_exclude_final_results(
232232
(False, "pass"), # include detection in training → anomaly absorbed
233233
(True, "fail"), # exclude detection from training → anomaly detected
234234
],
235-
ids=["include_detection_in_training", "exclude_detection_from_training"],
235+
ids=[
236+
"exclude_false",
237+
"exclude_true",
238+
], # Shortened to stay under Postgres 63-char limit
236239
)
237240
def test_anomaly_in_detection_period(
238241
test_id: str,
@@ -248,6 +251,8 @@ def test_anomaly_in_detection_period(
248251
- 7 days of anomalous data (72 Superman, 28 Spiderman per day) in detection period
249252
- Without exclusion: anomaly gets included in training baseline, test passes (misses anomaly)
250253
- With exclusion: anomaly excluded from training, test fails (detects anomaly)
254+
255+
Note: Parametrize IDs are shortened to avoid Postgres 63-character identifier limit.
251256
"""
252257
utc_now = datetime.utcnow()
253258

@@ -306,9 +311,8 @@ def test_anomaly_in_detection_period(
306311
if exclude_detection:
307312
test_args["exclude_detection_period_from_training"] = True
308313

309-
suffix = "_excl" if exclude_detection else "_incl"
310314
test_result = dbt_project.test(
311-
test_id + suffix,
315+
test_id,
312316
DBT_TEST_NAME,
313317
test_args,
314318
data=all_data,

0 commit comments

Comments
 (0)