Opened 8 years ago

#6500 enhancement new

Improve test coverage of TLSMemoryBIOProtocol._write

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords: tests
Cc: Branch:


As part of #6477, it was noted that this change to the send-buffer management code introduces no test failures:

  • twisted/protocols/

    519519                sent = self._tlsConnection.send(toSend)
    520520            except WantReadError:
    521521                self._writeBlockedOnRead = True
    522                 self._appSendBuffer.append(bytes[alreadySent:])
     522                self._appSendBuffer.append(bytes[0:])
    523523                if self._producer is not None:
    524524                    self._producer.pauseProducing()
    525525                break

That's unfortunate, since it's a pretty bad change that actually breaks the transport (causing it to double-send some bytes).

The test suite should be improved to demonstrate that the current implementation really is correct and to prevent a regression in this area.

Change History (0)

Note: See TracTickets for help on using tickets.