Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vickenty committed Aug 17, 2023
1 parent 8bf11f9 commit d2f4a60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/integration/dogstatsd/test_statsd_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"disable_background_sender, disable_buffering, wait_for_pending, socket_timeout",
list(itertools.product([True, False], [True, False], [True, False], [0, 1])),
)
def test_sender_mode(disable_sender, disable_buffering, wait_for_pending, socket_timeout):
def test_sender_mode(disable_background_sender, disable_buffering, wait_for_pending, socket_timeout):
# Test basic sender operation with an assortment of options
foo, bar = socket.socketpair(socket.AF_UNIX, socket.SOCK_DGRAM, 0)
statsd = DogStatsd(
telemetry_min_flush_interval=0,
disable_sender=disable_sender,
disable_background_sender=disable_background_sender,
disable_buffering=disable_buffering,
socket_timeout=socket_timeout,
)
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/dogstatsd/test_statsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1872,17 +1872,17 @@ def test_service_check_with_container_field(self):
self.statsd._container_id = None

def test_sender_mode(self):
statsd = DogStatsd(disable_sender=True)
statsd = DogStatsd(disable_background_sender=True)
self.assertIsNone(statsd._queue)

statsd = DogStatsd(disable_sender=False)
statsd = DogStatsd(disable_background_sender=False)
self.assertIsNotNone(statsd._queue)

def test_sender_calls_task_done(self):
statsd = DogStatsd(disable_sender=False)
statsd = DogStatsd(disable_background_sender=False)
statsd.socket = OverflownSocket()
statsd.increment("test.metric")
statsd.wait_for_pending()

def test_sender_queue_no_timeout(self):
statsd = DogStatsd(disable_sender=False, sender_queue_timeout=None)
statsd = DogStatsd(disable_background_sender=False, sender_queue_timeout=None)

0 comments on commit d2f4a60

Please sign in to comment.