Skip to content

Commit f672569

Browse files
committed
Try removing test_logger_thread_leaks
1 parent 7022b84 commit f672569

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

tests/pulsar_test.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,34 +1529,6 @@ def test_json_schema_encode(self):
15291529
self.assertEqual(first_encode, second_encode)
15301530

15311531

1532-
def test_logger_thread_leaks(self):
1533-
def _do_connect(close):
1534-
logger = logging.getLogger(str(threading.current_thread().ident))
1535-
logger.setLevel(logging.INFO)
1536-
client = pulsar.Client(
1537-
service_url="pulsar://localhost:6650",
1538-
io_threads=4,
1539-
message_listener_threads=4,
1540-
operation_timeout_seconds=1,
1541-
log_conf_file_path=None,
1542-
authentication=None,
1543-
logger=logger,
1544-
)
1545-
client.get_topic_partitions("persistent://public/default/partitioned_topic_name_test")
1546-
if close:
1547-
client.close()
1548-
1549-
for should_close in (True, False):
1550-
self.assertEqual(threading.active_count(), 1, "Explicit close: {}; baseline is 1 thread".format(should_close))
1551-
_do_connect(should_close)
1552-
self.assertEqual(threading.active_count(), 1, "Explicit close: {}; synchronous connect doesn't leak threads".format(should_close))
1553-
threads = []
1554-
for _ in range(10):
1555-
threads.append(threading.Thread(target=_do_connect, args=(should_close)))
1556-
threads[-1].start()
1557-
for thread in threads:
1558-
thread.join()
1559-
assert threading.active_count() == 1, "Explicit close: {}; threaded connect in parallel doesn't leak threads".format(should_close)
15601532

15611533
def test_chunking(self):
15621534
client = Client(self.serviceUrl)

0 commit comments

Comments
 (0)