[CalendarServer-changes] [9312] CalendarServer/trunk/contrib/performance/loadtest

source_changes at macosforge.org source_changes at macosforge.org
Wed May 30 10:23:02 PDT 2012


Revision: 9312
          http://trac.macosforge.org/projects/calendarserver/changeset/9312
Author:   cdaboo at apple.com
Date:     2012-05-30 10:23:01 -0700 (Wed, 30 May 2012)
Log Message:
-----------
Fix some tests.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/test_profiles.py
    CalendarServer/trunk/contrib/performance/loadtest/test_sim.py

Modified: CalendarServer/trunk/contrib/performance/loadtest/test_profiles.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/test_profiles.py	2012-05-30 17:22:48 UTC (rev 9311)
+++ CalendarServer/trunk/contrib/performance/loadtest/test_profiles.py	2012-05-30 17:23:01 UTC (rev 9312)
@@ -316,7 +316,7 @@
     """
     def setUp(self):
         self.sim = CalendarClientSimulator(
-            AnyUser(), Populator(None), None, None, None, None)
+            AnyUser(), Populator(None), None, None, None, None, None)
 
 
     def _simpleAccount(self, userNumber, eventText):
@@ -516,7 +516,7 @@
     """
     def setUp(self):
         self.sim = CalendarClientSimulator(
-            AnyUser(), Populator(None), None, None, None, None)
+            AnyUser(), Populator(None), None, None, None, None, None)
 
 
     def _simpleAccount(self, userNumber, eventText):
@@ -685,7 +685,7 @@
     """
     def setUp(self):
         self.sim = CalendarClientSimulator(
-            AnyUser(), Populator(None), None, None, None, None)
+            AnyUser(), Populator(None), None, None, None, None, None)
 
 
     def test_enabled(self):
@@ -949,7 +949,7 @@
     """
     def setUp(self):
         self.sim = CalendarClientSimulator(
-            AnyUser(), Populator(None), None, None, None, None)
+            AnyUser(), Populator(None), None, None, None, None, None)
 
 
     def test_enabled(self):

Modified: CalendarServer/trunk/contrib/performance/loadtest/test_sim.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/test_sim.py	2012-05-30 17:22:48 UTC (rev 9311)
+++ CalendarServer/trunk/contrib/performance/loadtest/test_sim.py	2012-05-30 17:23:01 UTC (rev 9312)
@@ -117,7 +117,7 @@
         """
         calsim = CalendarClientSimulator(
             [self._user('alice'), self._user('bob'), self._user('carol')],
-            Populator(None), None, None, 'http://example.org:1234/', None)
+            Populator(None), None, None, 'http://example.org:1234/', None, None)
         users = sorted([
                 calsim._createUser(0)[0],
                 calsim._createUser(1)[0],
@@ -133,7 +133,7 @@
         """
         calsim = CalendarClientSimulator(
             [self._user('alice')],
-            Populator(None), None, None, 'http://example.org:1234/', None)
+            Populator(None), None, None, 'http://example.org:1234/', None, None)
         user, auth = calsim._createUser(0)
         self.assertEqual(
             auth.passwd.find_user_password('Test Realm', 'http://example.org:1234/')[1],
@@ -146,7 +146,7 @@
         profiles are not logged.
         """
         class BrokenClient(object):
-            def __init__(self, reactor, serverAddress, principalPathTemplate, userInfo, auth, runResult):
+            def __init__(self, reactor, serverAddress, principalPathTemplate, serializationPath, userInfo, auth, runResult):
                 self._runResult = runResult
 
             def run(self):
@@ -171,7 +171,7 @@
                 BrokenClient, {'runResult': clientRunResult},
                 [ProfileType(BrokenProfile, {'runResult': profileRunResult})]))
         sim = CalendarClientSimulator(
-            [self._user('alice')], Populator(None), params, None, 'http://example.com:1234/', None)
+            [self._user('alice')], Populator(None), params, None, 'http://example.com:1234/', None, None)
         sim.add(1, 1)
         sim.stop()
         clientRunResult.errback(RuntimeError("Some fictional client problem"))
@@ -248,7 +248,7 @@
         exc = self.assertRaises(
             SystemExit, StubSimulator.main, ['--config', config.path])
         self.assertEquals(
-            exc.args, (StubSimulator(None, None, None, None, None).run(),))
+            exc.args, (StubSimulator(None, None, None, None, None, None).run(),))
 
 
     def test_createSimulator(self):
@@ -259,7 +259,7 @@
         """
         server = 'http://127.0.0.7:1243/'
         reactor = object()
-        sim = LoadSimulator(server, None, None, None, None, reactor=reactor)
+        sim = LoadSimulator(server, None, None, None, None, None, reactor=reactor)
         calsim = sim.createSimulator()
         self.assertIsInstance(calsim, CalendarClientSimulator)
         self.assertIsInstance(calsim.reactor, LagTrackingReactor)
@@ -439,7 +439,7 @@
 
         reactor = object()
         sim = LoadSimulator(
-            None, None, None, Arrival(FakeArrival, {'x': 3, 'y': 2}), None, reactor=reactor)
+            None, None, None, None, Arrival(FakeArrival, {'x': 3, 'y': 2}), None, reactor=reactor)
         arrival = sim.createArrivalPolicy()
         self.assertIsInstance(arrival, FakeArrival)
         self.assertIdentical(arrival.reactor, sim.reactor)
@@ -501,7 +501,7 @@
         """
         config = FilePath(self.mktemp())
         config.setContent(writePlistToString({
-            "observers": {"type":"contrib.performance.loadtest.population.SimpleStatistics"}
+            "observers": [{"type":"contrib.performance.loadtest.population.SimpleStatistics", "params":{},},]
         }))
         sim = LoadSimulator.fromCommandLine(['--config', config.path])
         self.assertEquals(len(sim.observers), 1)
@@ -519,6 +519,7 @@
             "http://example.com:123/",
             "/principals/users/%s/",
             None,
+            None,
             Arrival(lambda reactor: NullArrival(), {}),
             None, observers, reactor=Reactor())
         io = StringIO()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120530/943d8d20/attachment-0001.html>


More information about the calendarserver-changes mailing list