Skip to content

Commit

Permalink
test: Fix order sensitivity in tests due to stale state; randomize tests
Browse files Browse the repository at this point in the history
This will help catch this sort of problem in the future, with the downside
that it may cause a test failure to first be seen on someone else's PR...
  • Loading branch information
timmc-edx committed Sep 19, 2024
1 parent 8e2868a commit 7e96641
Show file tree
Hide file tree
Showing 12 changed files with 177 additions and 143 deletions.
5 changes: 5 additions & 0 deletions edx_arch_experiments/datadog_diagnostics/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ def _pprint(self):
class TestMissingSpanProcessor(TestCase):
"""Tests for MissingSpanProcessor."""

def setUp(self):
# Remove custom span processor from previous runs.
# pylint: disable=protected-access
tracer._span_processors = [sp for sp in tracer._span_processors if type(sp).__name__ != 'MissingSpanProcessor']

def test_feature_switch(self):
"""
Regression test -- the use of override_settings ensures that we read
Expand Down
24 changes: 12 additions & 12 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ attrs==24.2.0
# via
# jsonschema
# referencing
certifi==2024.7.4
certifi==2024.8.30
# via requests
cffi==1.17.0
cffi==1.17.1
# via
# cryptography
# pynacl
Expand All @@ -24,9 +24,9 @@ click==8.1.7
# edx-django-utils
code-annotations==1.8.0
# via edx-toggles
cryptography==43.0.0
cryptography==43.0.1
# via pyjwt
django==4.2.15
django==4.2.16
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/base.in
Expand Down Expand Up @@ -63,13 +63,13 @@ edx-django-utils==5.15.0
# -r requirements/base.in
# edx-drf-extensions
# edx-toggles
edx-drf-extensions==10.3.0
edx-drf-extensions==10.4.0
# via -r requirements/base.in
edx-opaque-keys==2.10.0
edx-opaque-keys==2.11.0
# via edx-drf-extensions
edx-toggles==5.2.0
# via -r requirements/base.in
idna==3.7
idna==3.10
# via requests
jinja2==3.1.4
# via code-annotations
Expand All @@ -81,7 +81,7 @@ markupsafe==2.1.5
# via jinja2
newrelic==9.13.0
# via edx-django-utils
pbr==6.0.0
pbr==6.1.0
# via stevedore
psutil==6.0.0
# via edx-django-utils
Expand All @@ -91,7 +91,7 @@ pyjwt[crypto]==2.9.0
# via
# drf-jwt
# edx-drf-extensions
pymongo==4.8.0
pymongo==4.9.1
# via edx-opaque-keys
pynacl==1.5.0
# via edx-django-utils
Expand All @@ -115,7 +115,7 @@ six==1.16.0
# via edx-codejail
sqlparse==0.5.1
# via django
stevedore==5.2.0
stevedore==5.3.0
# via
# code-annotations
# edx-django-utils
Expand All @@ -124,9 +124,9 @@ text-unidecode==1.3
# via python-slugify
typing-extensions==4.12.2
# via edx-opaque-keys
urllib3==2.2.2
urllib3==2.2.3
# via requests

# The following packages are considered to be unsafe in a requirements file:
setuptools==73.0.1
setuptools==75.1.0
# via -r requirements/base.in
10 changes: 5 additions & 5 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ colorama==0.4.6
# via tox
distlib==0.3.8
# via virtualenv
filelock==3.15.4
filelock==3.16.1
# via
# tox
# virtualenv
packaging==24.1
# via
# pyproject-api
# tox
platformdirs==4.2.2
platformdirs==4.3.6
# via
# tox
# virtualenv
pluggy==1.5.0
# via tox
pyproject-api==1.7.1
pyproject-api==1.8.0
# via tox
tox==4.18.0
tox==4.20.0
# via -r requirements/ci.in
virtualenv==20.26.3
virtualenv==20.26.5
# via tox
Loading

0 comments on commit 7e96641

Please sign in to comment.