[CalendarServer-changes] [7496] CalendarServer/trunk/contrib/performance/loadtest
source_changes at macosforge.org
source_changes at macosforge.org
Wed May 18 11:37:12 PDT 2011
Revision: 7496
http://trac.macosforge.org/projects/calendarserver/changeset/7496
Author: exarkun at twistedmatrix.com
Date: 2011-05-18 11:37:11 -0700 (Wed, 18 May 2011)
Log Message:
-----------
Accept the rest of the connectTCP arguments in the proxy
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/loadtest/test_trafficlogger.py
CalendarServer/trunk/contrib/performance/loadtest/trafficlogger.py
Modified: CalendarServer/trunk/contrib/performance/loadtest/test_trafficlogger.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/test_trafficlogger.py 2011-05-18 18:04:52 UTC (rev 7495)
+++ CalendarServer/trunk/contrib/performance/loadtest/test_trafficlogger.py 2011-05-18 18:37:11 UTC (rev 7496)
@@ -98,11 +98,13 @@
factory.protocol = lambda: proto
reactor = MemoryReactor()
logged = loggedReactor(reactor)
- logged.connectTCP('192.168.1.2', 1234, factory)
- [(host, port, factory, backlog, interface)] = reactor.tcpClients
+ logged.connectTCP('192.168.1.2', 1234, factory, 21, '127.0.0.2')
+ [(host, port, factory, timeout, bindAddress)] = reactor.tcpClients
self.assertEqual('192.168.1.2', host)
self.assertEqual(1234, port)
self.assertIsInstance(factory, _TrafficLoggingFactory)
+ self.assertEqual(21, timeout)
+ self.assertEqual('127.0.0.2', bindAddress)
# Verify that the factory and protocol specified are really being used
protocol = factory.buildProtocol(None)
Modified: CalendarServer/trunk/contrib/performance/loadtest/trafficlogger.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/trafficlogger.py 2011-05-18 18:04:52 UTC (rev 7495)
+++ CalendarServer/trunk/contrib/performance/loadtest/trafficlogger.py 2011-05-18 18:37:11 UTC (rev 7496)
@@ -52,9 +52,9 @@
A mixin for a reactor wrapper which defines C{connectTCP} so as to cause
traffic to be logged.
"""
- def connectTCP(self, host, port, factory):
+ def connectTCP(self, host, port, factory, *args, **kwargs):
return self._reactor.connectTCP(
- host, port, _TrafficLoggingFactory(factory))
+ host, port, _TrafficLoggingFactory(factory), *args, **kwargs)
class _TrafficLoggingFactory(WrappingFactory):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110518/c5f851f1/attachment-0001.html>
More information about the calendarserver-changes
mailing list