Skip to content

Commit

Permalink
Reset config before/after jaeger export tests
Browse files Browse the repository at this point in the history
Some of its tests set env vars so they can be retrieved in the
Configuration; since some modules initialize it at load-time, it needs
to be reset before and after tests
  • Loading branch information
LetzNico committed Dec 5, 2020
1 parent 7096de6 commit d4ef006
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def setUp(self):
self._test_span = trace._Span("test_span", context=context)
self._test_span.start()
self._test_span.end()
Configuration._reset()

def tearDown(self):
Configuration._reset()

def test_constructor_default(self):
"""Test the default values assigned by constructor."""
Expand Down Expand Up @@ -142,8 +146,6 @@ def test_constructor_by_environment_variables(self):

environ_patcher.stop()

Configuration._reset()

def test_nsec_to_usec_round(self):
# pylint: disable=protected-access
nsec_to_usec_round = jaeger_exporter._nsec_to_usec_round
Expand Down

0 comments on commit d4ef006

Please sign in to comment.