diff --git a/tests/datastore_firestore/test_client.py b/tests/datastore_firestore/test_client.py index e7c731f4a..8409091ec 100644 --- a/tests/datastore_firestore/test_client.py +++ b/tests/datastore_firestore/test_client.py @@ -13,9 +13,6 @@ # limitations under the License. import pytest -from newrelic.api.time_trace import current_trace -from newrelic.api.datastore_trace import DatastoreTrace -from testing_support.db_settings import firestore_settings from testing_support.validators.validate_transaction_metrics import validate_transaction_metrics from newrelic.api.background_task import background_task from testing_support.validators.validate_database_duration import ( @@ -48,6 +45,7 @@ def test_firestore_client(client, collection, existing_document): ("Datastore/allOther", 2), ] + @validate_database_duration() @validate_transaction_metrics( "test_firestore_client", scoped_metrics=_test_scoped_metrics, @@ -68,9 +66,3 @@ def test_firestore_client_generators(client, collection, assert_trace_for_genera assert_trace_for_generator(client.collections) assert_trace_for_generator(client.get_all, [doc]) - - -@validate_database_duration() -@background_task() -def test_firestore_client_db_duration(client, collection, existing_document): - _exercise_client(client, collection, existing_document) diff --git a/tests/datastore_firestore/test_collections.py b/tests/datastore_firestore/test_collections.py index ae2b48f04..997675c9e 100644 --- a/tests/datastore_firestore/test_collections.py +++ b/tests/datastore_firestore/test_collections.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from newrelic.api.time_trace import current_trace -from newrelic.api.datastore_trace import DatastoreTrace from testing_support.validators.validate_transaction_metrics import validate_transaction_metrics from newrelic.api.background_task import background_task from testing_support.validators.validate_database_duration import ( @@ -50,6 +48,7 @@ def test_firestore_collections(collection): ("Datastore/all", 5), ("Datastore/allOther", 5), ] + @validate_database_duration() @validate_transaction_metrics( "test_firestore_collections", scoped_metrics=_test_scoped_metrics, @@ -71,9 +70,3 @@ def test_firestore_collections_generators(collection, assert_trace_for_generator assert_trace_for_generator(collection.stream) assert_trace_for_generator(collection.list_documents) - - -@validate_database_duration() -@background_task() -def test_firestore_collections_db_duration(collection): - _exercise_collections(collection) diff --git a/tests/datastore_firestore/test_documents.py b/tests/datastore_firestore/test_documents.py index 67ad42dd6..a648b3f92 100644 --- a/tests/datastore_firestore/test_documents.py +++ b/tests/datastore_firestore/test_documents.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from newrelic.api.time_trace import current_trace -from newrelic.api.datastore_trace import DatastoreTrace from testing_support.validators.validate_transaction_metrics import validate_transaction_metrics from newrelic.api.background_task import background_task from testing_support.validators.validate_database_duration import ( @@ -59,6 +57,7 @@ def test_firestore_documents(collection): ("Datastore/all", 7), ("Datastore/allOther", 7), ] + @validate_database_duration() @validate_transaction_metrics( "test_firestore_documents", scoped_metrics=_test_scoped_metrics, @@ -81,9 +80,3 @@ def test_firestore_documents_generators(collection, assert_trace_for_generator): assert len([_ for _ in subcollection_doc.collections()]) == 2 assert_trace_for_generator(subcollection_doc.collections) - - -@validate_database_duration() -@background_task() -def test_firestore_documents_db_duration(collection): - _exercise_documents(collection) diff --git a/tests/datastore_firestore/test_query.py b/tests/datastore_firestore/test_query.py index 128042a99..26426695c 100644 --- a/tests/datastore_firestore/test_query.py +++ b/tests/datastore_firestore/test_query.py @@ -47,6 +47,7 @@ def test_firestore_query(collection): ("Datastore/all", 2), ("Datastore/allOther", 2), ] + @validate_database_duration() @validate_transaction_metrics( "test_firestore_query", scoped_metrics=_test_scoped_metrics, @@ -65,12 +66,6 @@ def test_firestore_query_generators(collection, assert_trace_for_generator): query = collection.select("x").where(field_path="x", op_string="<=", value=3) assert_trace_for_generator(query.stream) - -@validate_database_duration() -@background_task() -def test_firestore_query_db_duration(collection): - _exercise_query(collection) - # ===== AggregationQuery ===== def _exercise_aggregation_query(collection): @@ -91,6 +86,7 @@ def test_firestore_aggregation_query(collection): ("Datastore/all", 2), ("Datastore/allOther", 2), ] + @validate_database_duration() @validate_transaction_metrics( "test_firestore_aggregation_query", scoped_metrics=_test_scoped_metrics, @@ -108,9 +104,3 @@ def _test(): def test_firestore_aggregation_query_generators(collection, assert_trace_for_generator): aggregation_query = collection.select("x").where(field_path="x", op_string="<=", value=3).count() assert_trace_for_generator(aggregation_query.stream) - - -@validate_database_duration() -@background_task() -def test_firestore_aggregation_query_db_duration(collection): - _exercise_aggregation_query(collection) diff --git a/tests/datastore_firestore/test_transaction.py b/tests/datastore_firestore/test_transaction.py index 679821dfc..c38d19f6a 100644 --- a/tests/datastore_firestore/test_transaction.py +++ b/tests/datastore_firestore/test_transaction.py @@ -13,9 +13,6 @@ # limitations under the License. import pytest -from newrelic.api.time_trace import current_trace -from newrelic.api.datastore_trace import DatastoreTrace -from testing_support.db_settings import firestore_settings from testing_support.validators.validate_transaction_metrics import validate_transaction_metrics from newrelic.api.background_task import background_task from testing_support.validators.validate_database_duration import (