Skip to content

Commit 450bc9e

Browse files
committed
Move retry wrapper inside of tests
Move retry wrapper inside of test as it interferes with the pytest function definition in Python 2.7.
1 parent 0ccc5e8 commit 450bc9e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/agent_features/test_priority_sampling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626

2727
@override_application_settings({"event_harvest_config.harvest_limits.analytic_event_data": 1})
2828
@pytest.mark.parametrize("first_transaction_saved", [True, False])
29-
@retry(attempts=5, wait=2) # This test is flakey so add a retry.
3029
def test_priority_used_in_transaction_events(first_transaction_saved):
3130
first_priority = 1 if first_transaction_saved else 0
3231
second_priority = 0 if first_transaction_saved else 1
3332

33+
@retry(attempts=5, wait=2) # This test is flakey so add a retry.
3434
@reset_core_stats_engine()
3535
def _test():
3636
# Stats engine

tests/agent_streaming/test_infinite_tracing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ def connect_complete():
332332
@conditional_decorator(
333333
condition=six.PY2, decorator=pytest.mark.xfail(reason="Test frequently times out on Py2.", strict=False)
334334
)
335-
@retry(attempts=5, wait=2) # This test is flakey so add a retry.
336335
def test_no_data_loss_on_reconnect(mock_grpc_server, app, buffer_empty_event, batching, spans_processed_event):
337336
"""
338337
Test for data loss when channel is closed by the server while waiting for more data in a request iterator.
@@ -356,6 +355,7 @@ def test_no_data_loss_on_reconnect(mock_grpc_server, app, buffer_empty_event, ba
356355

357356
span = Span(intrinsics={}, agent_attributes={}, user_attributes={})
358357

358+
@retry(attempts=5, wait=2) # This test is flakey so add a retry.
359359
@override_generic_settings(
360360
settings,
361361
{

0 commit comments

Comments
 (0)