Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: remove xfail_if_not_postgres #82097

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/sentry/testutils/skips.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import os
import socket
from collections.abc import Callable
from typing import Any, TypeVar
Expand All @@ -12,15 +11,6 @@
T = TypeVar("T", bound=Callable[..., Any])


def xfail_if_not_postgres(reason: str) -> Callable[[T], T]:
def decorator(function: T) -> T:
return pytest.mark.xfail(os.environ.get("TEST_SUITE") != "postgres", reason=reason)(
function
)

return decorator


def skip_for_relay_store(reason: str) -> Callable[[T], T]:
"""
Decorator factory will skip marked tests if Relay is enabled.
Expand Down
4 changes: 1 addition & 3 deletions tests/snuba/search/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
from sentry.testutils.cases import SnubaTestCase, TestCase, TransactionTestCase
from sentry.testutils.helpers import Feature, apply_feature_flag_on_cls
from sentry.testutils.helpers.datetime import before_now, iso_format
from sentry.testutils.skips import xfail_if_not_postgres
from sentry.types.group import GroupSubStatus, PriorityLevel
from sentry.utils import json
from sentry.utils.snuba import SENTRY_SNUBA_MAP
Expand Down Expand Up @@ -121,7 +120,7 @@ def setUp(self):
data={
"fingerprint": ["put-me-in-group1"],
"event_id": "a" * 32,
"message": "foo. Also, this message is intended to be greater than 256 characters so that we can put some unique string identifier after that point in the string. The purpose of this is in order to verify we are using snuba to search messages instead of Postgres (postgres truncates at 256 characters and clickhouse does not). santryrox.",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I subtly adjusted the text here to avoid the wildcards used in the test. most of them used so*t which is why all the words modified have so in them

"message": "foo. Indeed, this message is intended to be greater than 256 characters such that we can put this unique string identifier after that point in the string. The purpose of this is in order to verify we are using snuba to search messages instead of Postgres (postgres truncates at 256 characters and clickhouse does not). santryrox.",
"environment": "production",
"tags": {"server": "example.com", "sentry:user": "[email protected]"},
"timestamp": event1_timestamp,
Expand Down Expand Up @@ -2120,7 +2119,6 @@ def test_query_enclosed_in_quotes(self):
results = self.make_query(search_filter_query='"bar"')
assert set(results) == {self.group2}

@xfail_if_not_postgres("Wildcard searching only supported in Postgres")
def test_wildcard(self):
escaped_event = self.store_event(
data={
Expand Down
Loading