Skip to content

test_imaplib takes 40+ minutes in refleaks builds #120048

Closed
@colesbury

Description

@colesbury

Bug report

Similar to #120039, test_imaplib has at least one test that expects a timeout and that time out is scaled up with the global time out, so the refleaks tests unnecessarily take 40+ minutes.

class SimpleIMAPHandler(socketserver.StreamRequestHandler):
timeout = support.LOOPBACK_TIMEOUT

@requires_resource('walltime')
def test_imaplib_timeout_test(self):
_, server = self._setup(SimpleIMAPHandler)
addr = server.server_address[1]
client = self.imap_class("localhost", addr, timeout=None)
self.assertEqual(client.sock.timeout, None)
client.shutdown()
client = self.imap_class("localhost", addr, timeout=support.LOOPBACK_TIMEOUT)
self.assertEqual(client.sock.timeout, support.LOOPBACK_TIMEOUT)
client.shutdown()
with self.assertRaises(ValueError):
client = self.imap_class("localhost", addr, timeout=0)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions