Skip to content

Commit

Permalink
Rerun a flaky test (#639)
Browse files Browse the repository at this point in the history
* Rerun a flaky test
  • Loading branch information
ocelotl authored Aug 30, 2021
1 parent ffc2a2f commit c279ee5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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():
Expand Down Expand Up @@ -143,7 +144,7 @@ def fn_task(self):
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):
Expand Down Expand Up @@ -190,7 +191,7 @@ def fn_task_parameters(user, force_logout=False):
)


@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():
Expand All @@ -206,7 +207,7 @@ def fn_task():
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):
Expand Down Expand Up @@ -476,7 +477,7 @@ def add(x, y):
)


@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
):
Expand Down Expand Up @@ -558,6 +559,8 @@ class CelerySubClass(CelerySuperClass):
) == 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():
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c279ee5

Please sign in to comment.