Skip to content

Commit 9d411e0

Browse files
committed
Clean out unnecessary code
1 parent cb550ba commit 9d411e0

File tree

5 files changed

+5
-40
lines changed

5 files changed

+5
-40
lines changed

tests/datastore_firestore/test_client.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
# limitations under the License.
1414
import pytest
1515

16-
from newrelic.api.time_trace import current_trace
17-
from newrelic.api.datastore_trace import DatastoreTrace
18-
from testing_support.db_settings import firestore_settings
1916
from testing_support.validators.validate_transaction_metrics import validate_transaction_metrics
2017
from newrelic.api.background_task import background_task
2118
from testing_support.validators.validate_database_duration import (
@@ -48,6 +45,7 @@ def test_firestore_client(client, collection, existing_document):
4845
("Datastore/allOther", 2),
4946
]
5047

48+
@validate_database_duration()
5149
@validate_transaction_metrics(
5250
"test_firestore_client",
5351
scoped_metrics=_test_scoped_metrics,
@@ -68,9 +66,3 @@ def test_firestore_client_generators(client, collection, assert_trace_for_genera
6866

6967
assert_trace_for_generator(client.collections)
7068
assert_trace_for_generator(client.get_all, [doc])
71-
72-
73-
@validate_database_duration()
74-
@background_task()
75-
def test_firestore_client_db_duration(client, collection, existing_document):
76-
_exercise_client(client, collection, existing_document)

tests/datastore_firestore/test_collections.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from newrelic.api.time_trace import current_trace
16-
from newrelic.api.datastore_trace import DatastoreTrace
1715
from testing_support.validators.validate_transaction_metrics import validate_transaction_metrics
1816
from newrelic.api.background_task import background_task
1917
from testing_support.validators.validate_database_duration import (
@@ -50,6 +48,7 @@ def test_firestore_collections(collection):
5048
("Datastore/all", 5),
5149
("Datastore/allOther", 5),
5250
]
51+
@validate_database_duration()
5352
@validate_transaction_metrics(
5453
"test_firestore_collections",
5554
scoped_metrics=_test_scoped_metrics,
@@ -71,9 +70,3 @@ def test_firestore_collections_generators(collection, assert_trace_for_generator
7170

7271
assert_trace_for_generator(collection.stream)
7372
assert_trace_for_generator(collection.list_documents)
74-
75-
76-
@validate_database_duration()
77-
@background_task()
78-
def test_firestore_collections_db_duration(collection):
79-
_exercise_collections(collection)

tests/datastore_firestore/test_documents.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from newrelic.api.time_trace import current_trace
16-
from newrelic.api.datastore_trace import DatastoreTrace
1715
from testing_support.validators.validate_transaction_metrics import validate_transaction_metrics
1816
from newrelic.api.background_task import background_task
1917
from testing_support.validators.validate_database_duration import (
@@ -59,6 +57,7 @@ def test_firestore_documents(collection):
5957
("Datastore/all", 7),
6058
("Datastore/allOther", 7),
6159
]
60+
@validate_database_duration()
6261
@validate_transaction_metrics(
6362
"test_firestore_documents",
6463
scoped_metrics=_test_scoped_metrics,
@@ -81,9 +80,3 @@ def test_firestore_documents_generators(collection, assert_trace_for_generator):
8180
assert len([_ for _ in subcollection_doc.collections()]) == 2
8281

8382
assert_trace_for_generator(subcollection_doc.collections)
84-
85-
86-
@validate_database_duration()
87-
@background_task()
88-
def test_firestore_documents_db_duration(collection):
89-
_exercise_documents(collection)

tests/datastore_firestore/test_query.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def test_firestore_query(collection):
4747
("Datastore/all", 2),
4848
("Datastore/allOther", 2),
4949
]
50+
@validate_database_duration()
5051
@validate_transaction_metrics(
5152
"test_firestore_query",
5253
scoped_metrics=_test_scoped_metrics,
@@ -65,12 +66,6 @@ def test_firestore_query_generators(collection, assert_trace_for_generator):
6566
query = collection.select("x").where(field_path="x", op_string="<=", value=3)
6667
assert_trace_for_generator(query.stream)
6768

68-
69-
@validate_database_duration()
70-
@background_task()
71-
def test_firestore_query_db_duration(collection):
72-
_exercise_query(collection)
73-
7469
# ===== AggregationQuery =====
7570

7671
def _exercise_aggregation_query(collection):
@@ -91,6 +86,7 @@ def test_firestore_aggregation_query(collection):
9186
("Datastore/all", 2),
9287
("Datastore/allOther", 2),
9388
]
89+
@validate_database_duration()
9490
@validate_transaction_metrics(
9591
"test_firestore_aggregation_query",
9692
scoped_metrics=_test_scoped_metrics,
@@ -108,9 +104,3 @@ def _test():
108104
def test_firestore_aggregation_query_generators(collection, assert_trace_for_generator):
109105
aggregation_query = collection.select("x").where(field_path="x", op_string="<=", value=3).count()
110106
assert_trace_for_generator(aggregation_query.stream)
111-
112-
113-
@validate_database_duration()
114-
@background_task()
115-
def test_firestore_aggregation_query_db_duration(collection):
116-
_exercise_aggregation_query(collection)

tests/datastore_firestore/test_transaction.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
# limitations under the License.
1414
import pytest
1515

16-
from newrelic.api.time_trace import current_trace
17-
from newrelic.api.datastore_trace import DatastoreTrace
18-
from testing_support.db_settings import firestore_settings
1916
from testing_support.validators.validate_transaction_metrics import validate_transaction_metrics
2017
from newrelic.api.background_task import background_task
2118
from testing_support.validators.validate_database_duration import (

0 commit comments

Comments
 (0)