Skip to content

test_imaplib.RemoteIMAP_STARTTLSTest.test_logout() fails randomly #80529

Closed

Description

@vstinner
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']

    Activity

    1. vstinner commented on Mar 18, 2019

      @vstinner
      MemberAuthor

      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.

    2. added
      3.8 (EOL)
      stdlib
      on Mar 18, 2019
    3. tirkarthi commented on Mar 18, 2019

      @tirkarthi
      Member

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

    4. vstinner commented on Mar 18, 2019

      @vstinner
      MemberAuthor

      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.

    5. vstinner commented on Mar 19, 2019

      @vstinner
      MemberAuthor

      See also bpo-35462.

    6. vstinner commented on Apr 15, 2019

      @vstinner
      MemberAuthor

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

    7. vstinner commented on Apr 15, 2019

      @vstinner
      MemberAuthor

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

    8. vstinner commented on Apr 15, 2019

      @vstinner
      MemberAuthor

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

    9. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)stdlibtopic-email

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions