[CalendarServer-changes] [13738] CalDAVTester/trunk/src/caldavtest.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jul 9 11:59:08 PDT 2014
Revision: 13738
http://trac.calendarserver.org//changeset/13738
Author: cdaboo at apple.com
Date: 2014-07-09 11:59:08 -0700 (Wed, 09 Jul 2014)
Log Message:
-----------
Report the actual count when wait counts fail.
Modified Paths:
--------------
CalDAVTester/trunk/src/caldavtest.py
Modified: CalDAVTester/trunk/src/caldavtest.py
===================================================================
--- CalDAVTester/trunk/src/caldavtest.py 2014-07-09 17:01:13 UTC (rev 13737)
+++ CalDAVTester/trunk/src/caldavtest.py 2014-07-09 18:59:08 UTC (rev 13738)
@@ -414,13 +414,13 @@
ctr += 1
if ctr - 1 == count:
- return True
+ return None
delay = self.manager.server_info.waitdelay
starttime = time.time()
while (time.time() < starttime + delay):
pass
else:
- return False
+ return ctr - 1
def dowaitchanged(self, uri, etag, user, pswd, label=""):
@@ -525,8 +525,9 @@
count = int(req.method[10:])
for ruri in req.ruris:
collection = (ruri, req.user, req.pswd)
- if not self.dowaitcount(collection, count, label=label):
- return False, "Count did not change", None, None
+ waitcount = self.dowaitcount(collection, count, label=label)
+ if waitcount is not None:
+ return False, "Count did not change: {}".format(waitcount), None, None
else:
return True, "", None, None
@@ -535,11 +536,12 @@
count = int(req.method[len("WAITDELETEALL"):])
for ruri in req.ruris:
collection = (ruri, req.user, req.pswd)
- if self.dowaitcount(collection, count, label=label):
+ waitcount = self.dowaitcount(collection, count, label=label)
+ if waitcount is None:
hrefs = self.dofindall(collection, label="%s | %s" % (label, "DELETEALL"))
self.dodeleteall(hrefs, label="%s | %s" % (label, "DELETEALL"))
else:
- return False, "Count did not change", None, None
+ return False, "Count did not change: {}".format(waitcount), None, None
else:
return True, "", None, None
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140709/60016b92/attachment-0001.html>
More information about the calendarserver-changes
mailing list