[Checkins] SVN: zope.server/branches/achapman-last_activity-bug/src/zope/server/tests/test_zombies.py - add test for reads
Alex Chapman
achapman at zope.com
Tue Sep 13 11:30:33 EST 2011
Log message for revision 122792:
- add test for reads
Changed:
U zope.server/branches/achapman-last_activity-bug/src/zope/server/tests/test_zombies.py
-=-
Modified: zope.server/branches/achapman-last_activity-bug/src/zope/server/tests/test_zombies.py
===================================================================
--- zope.server/branches/achapman-last_activity-bug/src/zope/server/tests/test_zombies.py 2011-09-13 14:48:33 UTC (rev 122791)
+++ zope.server/branches/achapman-last_activity-bug/src/zope/server/tests/test_zombies.py 2011-09-13 16:30:32 UTC (rev 122792)
@@ -35,7 +35,10 @@
self.data += data
return len(data)
+ def recv(self, data):
+ return 'data'
+
def zombies_test():
"""Regression test for ServerChannelBase kill_zombies method
@@ -96,6 +99,26 @@
>>> channel2.connected
True
+ We should test to see that read activity will update a channel as well.
+
+ >>> channel3.connected
+ True
+
+ >>> channel3.last_activity -= int(config.channel_timeout)
+
+ >>> import zope.server.http.httprequestparser
+ >>> channel3.parser_class = zope.server.http.httprequestparser.HTTPRequestParser
+ >>> channel3.handle_read()
+
+ >>> channel3.next_channel_cleanup[0] = channel3.creation_time - int(
+ ... config.cleanup_interval)
+
+ >>> socket4 = FakeSocket(4)
+ >>> channel4 = ServerChannelBase(sb, socket4, ('localhost', 4))
+
+ >>> channel3.connected
+ True
+
"""
def test_suite():
More information about the checkins
mailing list