Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zhengda committed Jan 27, 2025
1 parent aa46c0d commit 4bf8a8d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions postgres/tests/test_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,17 +1230,13 @@ def execute_in_thread(q):
conn.close()


@pytest.mark.parametrize("pg_stat_activity_view", ["pg_stat_activity", "datadog.pg_stat_activity()"])
def test_activity_raw_statement_collection(
aggregator, integration_check, dbm_instance, datadog_agent, pg_stat_activity_view
):
def test_activity_raw_statement_collection(aggregator, integration_check, dbm_instance, datadog_agent):

if POSTGRES_VERSION.split('.')[0] == "9" and pg_stat_activity_view == "pg_stat_activity":
if POSTGRES_VERSION.split('.')[0] == "9":
# cannot catch any queries from other users
# only can see own queries
return
# No need for query metrics here
dbm_instance['pg_stat_activity_view'] = pg_stat_activity_view
dbm_instance['dbstrict'] = True
dbm_instance['dbname'] = "datadog_test"
dbm_instance['query_metrics']['enabled'] = False
Expand Down

0 comments on commit 4bf8a8d

Please sign in to comment.