changeset 33193:cbb50fd830ea

configitems: register the 'badserver.closeaftersendbytes' config
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 30 Jun 2017 03:27:54 +0200
parents c538fca0d511
children c077eac329e2
files tests/badserverext.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/badserverext.py	Fri Jun 30 03:27:44 2017 +0200
+++ b/tests/badserverext.py	Fri Jun 30 03:27:54 2017 +0200
@@ -50,6 +50,9 @@
 configitem('badserver', 'closeafterrecvbytes',
     default=0,
 )
+configitem('badserver', 'closeaftersendbytes',
+    default=0,
+)
 
 # We can't adjust __class__ on a socket instance. So we define a proxy type.
 class socketproxy(object):
@@ -272,7 +275,7 @@
             closeafterrecvbytes = self._ui.configint('badserver',
                                                      'closeafterrecvbytes')
             closeaftersendbytes = self._ui.configint('badserver',
-                                                     'closeaftersendbytes', 0)
+                                                     'closeaftersendbytes')
 
             if closeafterrecvbytes or closeaftersendbytes:
                 socket = socketproxy(socket, self.errorlog,