Skip to content

trial -jN ... fails to report some large test results #11710

Closed
@exarkun

Description

Describe the incorrect behavior you saw

    test_renew_lease ... Traceback (most recent call last):
  File "/Users/distiller/project/venv/lib/python3.10/site-packages/twisted/internet/defer.py", line 1697, in _inlineCallbacks
    result = context.run(gen.send, result)
  File "/Users/distiller/project/venv/lib/python3.10/site-packages/twisted/trial/_dist/workerreporter.py", line 261, in addErrorFallible
    await addError(
  File "/Users/distiller/project/venv/lib/python3.10/site-packages/twisted/trial/_dist/workerreporter.py", line 48, in addError
    errorStreamId = await stream(amp, chunk(error, 2 ** 16 - 1))
  File "/Users/distiller/project/venv/lib/python3.10/site-packages/twisted/trial/_dist/stream.py", line 98, in stream
    await amp.callRemote(StreamWrite, streamId=streamId, data=oneChunk)
  File "/Users/distiller/project/venv/lib/python3.10/site-packages/twisted/protocols/amp.py", line 936, in callRemote
    return co._doCommand(self)
  File "/Users/distiller/project/venv/lib/python3.10/site-packages/twisted/protocols/amp.py", line 1951, in _doCommand
    d = proto._sendBoxCommand(
  File "/Users/distiller/project/venv/lib/python3.10/site-packages/twisted/protocols/amp.py", line 869, in _sendBoxCommand
    box._sendTo(self.boxSender)
  File "/Users/distiller/project/venv/lib/python3.10/site-packages/twisted/protocols/amp.py", line 698, in _sendTo
    proto.sendBox(self)
  File "/Users/distiller/project/venv/lib/python3.10/site-packages/twisted/protocols/amp.py", line 2336, in sendBox
    self.transport.write(box.serialize())
  File "/Users/distiller/project/venv/lib/python3.10/site-packages/twisted/protocols/amp.py", line 677, in serialize
    raise TooLong(False, True, v, k)
twisted.protocols.amp.TooLong:

Describe how to cause this behavior

A test that produces more than 2 ** 16 unicode characters of output with any character that encodes to more than 1 byte will trigger the behavior because disttrial measures unicode length but AMP enforces the length limit against bytes.

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions