Skip to content

Commit be2219c

Browse files
author
Bartek Ogryczak
authored
chore(grouping): add a test to document cases where parameterization is too aggressive (#72051)
Documenting this as a test case. Eventually we should fix these, bot not a top priority.
1 parent a0ec2f3 commit be2219c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/sentry/grouping/test_parameterization.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,3 +288,16 @@ def test_parameterize_regex_experiment_cached_compiled():
288288
)
289289
def test_fail_parameterize(name, input, expected, parameterizer):
290290
assert expected == parameterizer.parameterize_all(input), f"Case {name} Failed"
291+
292+
293+
# These are test cases were we're too aggressive
294+
@pytest.mark.xfail()
295+
@pytest.mark.parametrize(
296+
("name", "input", "expected"),
297+
[
298+
("Not an Int", "Encoding: utf-8", "Encoding: utf-8"), # produces "Encoding: utf<int>"
299+
("Not a Uniq ID", "X-Amz-Apigw-Id", "X-Amz-Apigw-Id"), # produces "<uniq_id>"
300+
],
301+
)
302+
def test_too_aggressive_parameterize(name, input, expected, parameterizer):
303+
assert expected == parameterizer.parameterize_all(input), f"Case {name} Failed"

0 commit comments

Comments
 (0)