Open twisted-trac opened 16 years ago
Automation removed owner |
---|
amaury commented |
---|
LineOnlyReceiver.lineLengthExceeded doesn't actually call loseConnection
I think it should; is there any reason why LineOnlyReceiver and LineReceiver differ on this point?
The corresponding test has to be changed as well: the last line of testLineTooLong() could be:
self.assertTrue(a.transport.closed)
I'm experimenting with a patch to improve the tests for LineReceiver/LineOnlyReceiver, based on how bzrlib tests some things. Specifically, I'm applying the same test case to two different implementations of the one interface: LineOnlyReceiver and LineReceiver.
This has revealed some inconsistencies with how LineReceiver and LineOnlyReceiver handle lineLengthExceeded:
The attached patch to test_protocols shows these test failures. (This patch is relative to my patch on [#3277](https://github.com/twisted/twisted/issues/3277), but it's also a bzr merge directive with full history vs. trunk).
As mentioned in #3277, I think lineLengthExceeded isn't a fully baked API, and these inconsistencies are symptoms of that.
Attachments:
Searchable metadata
``` trac-id__3353 3353 type__defect defect reporter__spiv spiv priority__normal normal milestone__ branch__ branch_author__ status__new new resolution__None None component__core core keywords__ time__1215958700000000 1215958700000000 changetime__1246348604000000 1246348604000000 version__None None owner__ cc__ivank ```