From 90ff78f27a8683cf92d2689819858d6388813c59 Mon Sep 17 00:00:00 2001 From: Joris Bayer Date: Mon, 15 Jul 2024 17:56:47 +0200 Subject: [PATCH] ref(test): Better names for similarly named tests (#3818) --- tests/integration/test_store.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/integration/test_store.py b/tests/integration/test_store.py index e49951bd3b..aa01cbade4 100644 --- a/tests/integration/test_store.py +++ b/tests/integration/test_store.py @@ -536,7 +536,7 @@ def test_sends_metric_bucket_outcome( outcomes_consumer.assert_empty() -def test_rate_limit_metric_bucket( +def test_enforce_bucket_rate_limits( mini_sentry, relay_with_processing, metrics_consumer, @@ -604,7 +604,7 @@ def make_bucket(name, type_, values): @pytest.mark.parametrize("violating_bucket", [2.0, 3.0]) -def test_rate_limit_metrics_buckets( +def test_enforce_transaction_rate_limit_on_metric_buckets( mini_sentry, relay_with_processing, metrics_consumer, @@ -685,7 +685,7 @@ def assert_metrics(expected_metrics): relay.send_metrics_buckets( project_id, [ - # Send a few non-duration buckets, they will not deplete the quota + # Send a few non-usage buckets, they will not deplete the quota make_bucket("d:transactions/measurements.lcp@millisecond", "d", 10 * [1.0]), # Session metrics are accepted make_bucket("d:sessions/session@none", "c", 1), @@ -733,7 +733,7 @@ def assert_metrics(expected_metrics): relay.send_metrics_buckets( project_id, [ - # Duration metric, subtract 3 from quota + # Usage metric, subtract 3 from quota make_bucket("c:transactions/usage@none", "c", 3), ], ) @@ -756,7 +756,7 @@ def assert_metrics(expected_metrics): relay.send_metrics_buckets( project_id, [ - # Can still send unlimited non-duration metrics + # Can still send unlimited non-usage metrics make_bucket("d:transactions/measurements.lcp@millisecond", "d", 10 * [2.0]), ], ) @@ -779,8 +779,8 @@ def assert_metrics(expected_metrics): relay.send_metrics_buckets( project_id, [ - # Usage metric, subtract from quota. This bucket is still accepted, but the rest - # will be exceeded. + # Usage metric, subtract from quota. This bucket is still accepted (see over_accept_once), + # but the rest will be rejected. make_bucket("c:transactions/usage@none", "c", violating_bucket), ], ) @@ -811,7 +811,7 @@ def assert_metrics(expected_metrics): relay.send_metrics_buckets( project_id, [ - # Another three for usage, won't make it into kafka. + # Another three for usage, won't make it into kafka because quota is zero. make_bucket("c:transactions/usage@none", "c", 3), # Session metrics are still accepted. make_bucket("d:sessions/session@user", "s", [1254]),