[CalendarServer-changes] [15617] CalendarServer/trunk/contrib/performance/loadtest/ical.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 19 15:04:51 PDT 2016
Revision: 15617
http://trac.calendarserver.org//changeset/15617
Author: sagen at apple.com
Date: 2016-05-19 15:04:51 -0700 (Thu, 19 May 2016)
Log Message:
-----------
Handle disappearing collections in the client sim
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/loadtest/ical.py
Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/ical.py 2016-05-19 22:04:30 UTC (rev 15616)
+++ CalendarServer/trunk/contrib/performance/loadtest/ical.py 2016-05-19 22:04:51 UTC (rev 15617)
@@ -1353,6 +1353,16 @@
# Calendar changed - reload it
yield self._updateCalendar(self._calendars[cal.url], newToken)
+ # Clean out previously seen collections that are no longer on the server
+ currentCalendarUris = [c.url for c in calendars]
+ for previouslySeenCalendarUri in self._calendars.keys():
+ if previouslySeenCalendarUri not in currentCalendarUris:
+ calendarToDelete = self._calendars[previouslySeenCalendarUri]
+ for eventUri in calendarToDelete.events.keys():
+ eventUri = urljoin(previouslySeenCalendarUri, eventUri)
+ self._removeEvent(eventUri)
+ del self._calendars[previouslySeenCalendarUri]
+
if notificationCollection is not None:
if self.supportNotificationSync:
if self._notificationCollection:
@@ -2562,8 +2572,27 @@
print("RESPONSE BODY:\n{}".format(responseBody))
print("=" * 80)
+ # elif event["duration"] > 9.0:
+ # body = event['body']
+ # if isinstance(body, StringProducer):
+ # body = body._body
+ # if body:
+ # body = body[:5000]
+ # responseBody = event['responseBody']
+ # if responseBody:
+ # responseBody = responseBody[:5000]
+ # print("=" * 80)
+ # print("LONG RESPONSE: {}".format(event['duration']))
+ # print("URL: {}".format(event['url']))
+ # print("METHOD: {}".format(event['method']))
+ # print("USER: {}".format(event['user']))
+ # print("REQUEST BODY:\n{}".format(body))
+ # print("RESPONSE BODY:\n{}".format(responseBody))
+ # print("=" * 80)
+
+
def report(self, output):
pass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160519/c53608ba/attachment.html>
More information about the calendarserver-changes
mailing list