Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_imaplib.RemoteIMAP_STARTTLSTest.test_logout() fails randomly #80529

Closed
vstinner opened this issue Mar 18, 2019 · 8 comments
Closed

test_imaplib.RemoteIMAP_STARTTLSTest.test_logout() fails randomly #80529

vstinner opened this issue Mar 18, 2019 · 8 comments
Labels
3.8 (EOL) end of life stdlib Python modules in the Lib dir topic-email

Comments

@vstinner
Copy link
Member

BPO 36348
Nosy @warsaw, @vstinner, @bitdancer, @tirkarthi
PRs
  • bpo-36348: IMAP4.logout() doesn't ignore exc #12411
  • [3.7] bpo-36348: test_imaplib: add debug info #12846
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-04-15.16:24:21.969>
    created_at = <Date 2019-03-18.14:57:13.419>
    labels = ['3.8', 'library', 'expert-email']
    title = 'test_imaplib.RemoteIMAP_STARTTLSTest.test_logout() fails randomly'
    updated_at = <Date 2019-04-15.16:45:07.461>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-04-15.16:45:07.461>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-04-15.16:24:21.969>
    closer = 'vstinner'
    components = ['Library (Lib)', 'email']
    creation = <Date 2019-03-18.14:57:13.419>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36348
    keywords = ['patch']
    message_count = 8.0
    messages = ['338233', '338235', '338244', '338245', '338385', '340292', '340293', '340296']
    nosy_count = 4.0
    nosy_names = ['barry', 'vstinner', 'r.david.murray', 'xtreak']
    pr_nums = ['12411', '12846']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36348'
    versions = ['Python 3.8']

    @vstinner
    Copy link
    Member Author

    https://buildbot.python.org/all/#/builders/21/builds/2512

    ======================================================================
    FAIL: test_logout (test.test_imaplib.RemoteIMAP_STARTTLSTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/test/test_imaplib.py", line 946, in test_logout
        self.assertEqual(rs[0], 'BYE')
    AssertionError: 'NO' != 'BYE'
    - NO
    + BYE

    The logout() returns 'NO' if *any* exception is raised:

        try: typ, dat = self._simple_command('LOGOUT')
        except: typ, dat = 'NO', ['%s: %s' % sys.exc_info()[:2]]
    

    Attached PR proposes a fix.

    @vstinner vstinner added 3.8 (EOL) end of life stdlib Python modules in the Lib dir labels Mar 18, 2019
    @tirkarthi
    Copy link
    Member

    Seems it used to fail randomly in past too : bpo-30648

    @vstinner
    Copy link
    Member Author

    Seems it used to fail randomly in past too : bpo-30648

    Well, test_logout() fails randomly every 6 months, but when it fails: we have zero info about the bug. The "NO" in the error means that an exception has been raised and the server didn't reply to the "LOGOUT" command.

    @vstinner
    Copy link
    Member Author

    @vstinner
    Copy link
    Member Author

    See also bpo-35462.

    @vstinner
    Copy link
    Member Author

    New changeset 74125a6 by Victor Stinner in branch 'master':
    bpo-36348: IMAP4.logout() doesn't ignore exc (GH-12411)
    74125a6

    @vstinner
    Copy link
    Member Author

    I pushed a change to get more information if the test fails again.

    @vstinner
    Copy link
    Member Author

    New changeset 2815bf5 by Victor Stinner in branch '3.7':
    bpo-36348: test_imaplib: add debug info (GH-12846)
    2815bf5

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 (EOL) end of life stdlib Python modules in the Lib dir topic-email
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants