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

KeyError running trial -j on MacOS / Python 2.7.15 #9521

Closed
twisted-trac opened this issue Sep 2, 2018 · 1 comment
Closed

KeyError running trial -j on MacOS / Python 2.7.15 #9521

twisted-trac opened this issue Sep 2, 2018 · 1 comment

Comments

@twisted-trac
Copy link

teratorn's avatar @teratorn reported
Trac ID trac#9521
Type defect
Created 2018-09-02 15:07:50Z

Running venv/bin/trial -j 8 twisted in a python 2.7.15 (homebrew) virtualenv using Twisted git trunk.

I'm getting errors like this, but it's not always the same key.. it seems to be rather ambiguous when it fails, but it's always after about 10 seconds, and it seems to be near the start of the TLSTests, but which test name will be in the key it is looking for is non-deterministic.

Running without -j works fine.

  SASLPLAINTests
    test_credentialsInvalidResponse ...                                    [OK]
  TLSTests
    test_loginBeforeSTARTTLS ...                                      [SKIPPED]
    test_startTLS ...                                                 [SKIPPED]
    test_startTLSWithExistingChallengers ...                          [SKIPPED]
    testAPileOfThings ...                                             [SKIPPED]
    testFailedStartTLS ...                                            [SKIPPED]
    test_doubleSTARTTLS ...                                           [SKIPPED]
    testLoginLogin ...                                                [SKIPPED]
Unhandled Error
Traceback (most recent call last):
  File "/Users/teratorn/code/twisted/src/twisted/protocols/amp.py", line 1043, in _commandReceived
    deferred = self.dispatchCommand(box)
  File "/Users/teratorn/code/twisted/src/twisted/protocols/amp.py", line 1101, in dispatchCommand
    return maybeDeferred(responder, box)
  File "/Users/teratorn/code/twisted/src/twisted/internet/defer.py", line 151, in maybeDeferred
    result = f(*args, **kw)
  File "/Users/teratorn/code/twisted/src/twisted/protocols/amp.py", line 1188, in doit
    return maybeDeferred(aCallable, **kw).addCallback(
--- <exception caught here> ---
  File "/Users/teratorn/code/twisted/src/twisted/internet/defer.py", line 654, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/Users/teratorn/code/twisted/src/twisted/protocols/amp.py", line 1171, in checkKnownErrors
    key = error.trap(*command.allErrors)
  File "/Users/teratorn/code/twisted/src/twisted/python/failure.py", line 441, in trap
    raise self
  File "/Users/teratorn/code/twisted/src/twisted/internet/defer.py", line 151, in maybeDeferred
    result = f(*args, **kw)
  File "/Users/teratorn/code/twisted/src/twisted/trial/_dist/worker.py", line 128, in addSkip
    self._result.addSkip(self._testCase, reason)
  File "/Users/teratorn/code/twisted/src/twisted/trial/_dist/distreporter.py", line 59, in addSkip
    self.running[test.id()].append((self.original.addSkip,
exceptions.KeyError: 'twisted.mail.test.test_imap.TLSTests.test_loginBeforeSTARTTLS'

another example:

  SASLPLAINTests
    test_credentialsInvalidResponse ...                                    [OK]
  TLSTests
    testAPileOfThings ...                                             [SKIPPED]
    test_startTLSWithExistingChallengers ...                          [SKIPPED]
Unhandled Error
Traceback (most recent call last):
  File "/Users/teratorn/code/twisted/src/twisted/protocols/amp.py", line 1043, in _commandReceived
    deferred = self.dispatchCommand(box)
  File "/Users/teratorn/code/twisted/src/twisted/protocols/amp.py", line 1101, in dispatchCommand
    return maybeDeferred(responder, box)
  File "/Users/teratorn/code/twisted/src/twisted/internet/defer.py", line 150, in maybeDeferred
    result = f(*args, **kw)
  File "/Users/teratorn/code/twisted/src/twisted/protocols/amp.py", line 1188, in doit
    return maybeDeferred(aCallable, **kw).addCallback(
--- <exception caught here> ---
  File "/Users/teratorn/code/twisted/src/twisted/internet/defer.py", line 150, in maybeDeferred
    result = f(*args, **kw)
  File "/Users/teratorn/code/twisted/src/twisted/trial/_dist/worker.py", line 133, in addSkip
    self._result.addSkip(self._testCase, reason)
  File "/Users/teratorn/code/twisted/src/twisted/trial/_dist/distreporter.py", line 59, in addSkip
    self.running[test.id()].append((self.original.addSkip,
exceptions.KeyError: 'twisted.mail.test.test_imap.TLSTests.testAPileOfThings'

                            [FAIL]
    testFailedStartTLS ...                                            [SKIPPED]
Searchable metadata
trac-id__9521 9521
type__defect defect
reporter__teratorn teratorn
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__new new
resolution__None None
component__trial trial
keywords__None None
time__1535900870818995 1535900870818995
changetime__1535900926858454 1535900926858454
version__None None
owner__None None
cc__jml
@adiroiban
Copy link
Member

I think that was fixed as of the latest improvements done by @exarkun for trial.

I have enabled macOS tests on GitHub actions with -j4 and there was no error.

it looks all good on our CI with -j4 - #11665

I think this can be closed .

If this is still an issue, please re-open

@adiroiban adiroiban closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants