Skip to content

Commit

Permalink
ref(test): Better names for similarly named tests (#3818)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbayer committed Jul 15, 2024
1 parent 3c87eaf commit 90ff78f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/integration/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
],
)
Expand All @@ -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]),
],
)
Expand All @@ -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),
],
)
Expand Down Expand Up @@ -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]),
Expand Down

0 comments on commit 90ff78f

Please sign in to comment.