Rerun a flaky test (#639)

* Rerun a flaky test
This commit is contained in:
Diego Hurtado
2021-08-31 00:17:58 +02:00
committed by GitHub
parent ffc2a2ff4c
commit c279ee59a8
2 changed files with 10 additions and 6 deletions

View File

@ -14,8 +14,9 @@
import celery
import pytest
from celery.exceptions import Retry
from flaky import flaky
from pytest import mark
import opentelemetry.instrumentation.celery
from opentelemetry import trace as trace_api
@ -33,7 +34,7 @@ class MyException(Exception):
pass
@pytest.mark.skip(reason="inconsistent test results")
@mark.skip(reason="inconsistent test results")
def test_instrumentation_info(celery_app, memory_exporter):
@celery_app.task
def fn_task():
@ -143,7 +144,7 @@ def test_fn_task_apply_bind(celery_app, memory_exporter):
assert span.attributes.get("celery.state") == "SUCCESS"
@pytest.mark.skip(reason="inconsistent test results")
@mark.skip(reason="inconsistent test results")
def test_fn_task_apply_async(celery_app, memory_exporter):
@celery_app.task
def fn_task_parameters(user, force_logout=False):
@ -190,7 +191,7 @@ def test_fn_task_apply_async(celery_app, memory_exporter):
)
@pytest.mark.skip(reason="inconsistent test results")
@mark.skip(reason="inconsistent test results")
def test_concurrent_delays(celery_app, memory_exporter):
@celery_app.task
def fn_task():
@ -206,7 +207,7 @@ def test_concurrent_delays(celery_app, memory_exporter):
assert len(spans) == 200
@pytest.mark.skip(reason="inconsistent test results")
@mark.skip(reason="inconsistent test results")
def test_fn_task_delay(celery_app, memory_exporter):
@celery_app.task
def fn_task_parameters(user, force_logout=False):
@ -476,7 +477,7 @@ def test_shared_task(celery_app, memory_exporter):
)
@pytest.mark.skip(reason="inconsistent test results")
@mark.skip(reason="inconsistent test results")
def test_apply_async_previous_style_tasks(
celery_app, celery_worker, memory_exporter
):
@ -558,6 +559,8 @@ def test_apply_async_previous_style_tasks(
) == async_run_span.attributes.get(SpanAttributes.MESSAGING_MESSAGE_ID)
# FIXME find a permanent solution for the flakiness of this test
@flaky
def test_custom_tracer_provider(celery_app, memory_exporter):
@celery_app.task
def fn_task():

View File

@ -408,6 +408,7 @@ deps =
protobuf>=3.13.0
requests==2.25.0
pyodbc~=4.0.30
flaky==3.7.0
changedir =
tests/opentelemetry-docker-tests/tests