Skip to content

Commit

Permalink
Remove obsolete test
Browse files Browse the repository at this point in the history
pre_fork is now mutually exclusive with get_socket() until post_fork
is called, so the sequence of events that the test was testing is no
longer possible.
  • Loading branch information
vickenty committed Aug 19, 2024
1 parent fb20759 commit 70b3d02
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions tests/unit/dogstatsd/test_statsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2028,16 +2028,3 @@ def test_max_payload_size(self):
self.assertEqual(statsd._max_payload_size, UDP_OPTIMAL_PAYLOAD_LENGTH)
statsd.socket_path = "/foo"
self.assertEqual(statsd._max_payload_size, UDS_OPTIMAL_PAYLOAD_LENGTH)

def test_post_fork_locks(self):
def inner():
statsd = DogStatsd(socket_path=None, port=8125)
# Statsd should survive this sequence of events
statsd.pre_fork()
statsd.get_socket()
statsd.post_fork_parent()
t = Thread(target=inner)
t.daemon = True
t.start()
t.join(timeout=5)
self.assertFalse(t.is_alive())

0 comments on commit 70b3d02

Please sign in to comment.