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

source_changes at macosforge.org source_changes at macosforge.org
Fri Jul 1 11:23:54 PDT 2011


Revision: 7704
          http://trac.macosforge.org/projects/calendarserver/changeset/7704
Author:   exarkun at twistedmatrix.com
Date:     2011-07-01 11:23:54 -0700 (Fri, 01 Jul 2011)
Log Message:
-----------
Save the pushkey for the calendar home as well

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/ical.py
    CalendarServer/trunk/contrib/performance/loadtest/test_ical.py

Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/ical.py	2011-07-01 16:24:24 UTC (rev 7703)
+++ CalendarServer/trunk/contrib/performance/loadtest/ical.py	2011-07-01 18:23:54 UTC (rev 7704)
@@ -73,11 +73,12 @@
     This represents an XMPP PubSub location where push notifications for
     particular calendar home might be received.
     """
-    compareAttributes = ('server', 'uri')
+    compareAttributes = ('server', 'uri', 'pushkey')
 
-    def __init__(self, server, uri):
+    def __init__(self, server, uri, pushkey):
         self.server = server
         self.uri = uri
+        self.pushkey = pushkey
 
 
 
@@ -137,7 +138,6 @@
         raise NotImplementedError("%r does not implement changeEventAttendee" % (self.__class__,))
 
 
-
 class SnowLeopard(BaseClient):
     """
     Implementation of the SnowLeopard iCal network behavior.
@@ -270,8 +270,9 @@
                 text = principals[principal].getTextProperties()
                 server = text[csxml.xmpp_server]
                 uri = text[csxml.xmpp_uri]
+                pushkey = text[csxml.pushkey]
                 if server and uri:
-                    self.xmpp[principal] = XMPPPush(server, uri)
+                    self.xmpp[principal] = XMPPPush(server, uri, pushkey)
 
             nodes = principals[principal].getNodeProperties()
             for nodeType in nodes[davxml.resourcetype].getchildren():
@@ -522,6 +523,7 @@
             hrefs = principal.getHrefProperties()
             calendarHome = hrefs[caldavxml.calendar_home_set].toString()
             yield self._checkCalendarsForEvents(calendarHome)
+
             returnValue(calendarHome)
         calendarHome = yield self._newOperation("startup", startup())
 

Modified: CalendarServer/trunk/contrib/performance/loadtest/test_ical.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/test_ical.py	2011-07-01 16:24:24 UTC (rev 7703)
+++ CalendarServer/trunk/contrib/performance/loadtest/test_ical.py	2011-07-01 18:23:54 UTC (rev 7704)
@@ -228,7 +228,7 @@
           </privilege>
         </current-user-privilege-set>
         <push-transports xmlns='http://calendarserver.org/ns/'/>
-        <pushkey xmlns='http://calendarserver.org/ns/'/>
+        <pushkey xmlns='http://calendarserver.org/ns/'>/Some/Unique/Value</pushkey>
       </prop>
       <status>HTTP/1.1 200 OK</status>
     </propstat>
@@ -938,7 +938,9 @@
         self.assertEqual({
                 home: XMPPPush(
                     "xmpp.example.invalid:1952",
-                    "xmpp:pubsub.xmpp.example.invalid?pubsub;node=/CalDAV/another.example.invalid/user01/")},
+                    "xmpp:pubsub.xmpp.example.invalid?pubsub;node=/CalDAV/another.example.invalid/user01/",
+                    "/Some/Unique/Value"
+                    )},
                          self.client.xmpp)
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110701/90f2cbee/attachment.html>


More information about the calendarserver-changes mailing list