[CalendarServer-changes] [10916] CalendarServer/branches/users/gaya/sharedgroups/txdav
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 13 17:06:03 PDT 2013
Revision: 10916
http://trac.calendarserver.org//changeset/10916
Author: gaya at apple.com
Date: 2013-03-13 17:06:03 -0700 (Wed, 13 Mar 2013)
Log Message:
-----------
_removeResource() is deferred. Fix other test cases
Modified Paths:
--------------
CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-only/2.xml
CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-only/3.xml
CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-write/2.xml
CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-write/3.xml
CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-feature.xml
CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-peruser-properties.xml
CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-replies.xml
CalendarServer/branches/users/gaya/sharedgroups/testserver
CalendarServer/branches/users/gaya/sharedgroups/txdav/base/propertystore/sql.py
CalendarServer/branches/users/gaya/sharedgroups/txdav/carddav/datastore/sql.py
CalendarServer/branches/users/gaya/sharedgroups/txdav/common/datastore/sql.py
Modified: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-only/2.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-only/2.xml 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-only/2.xml 2013-03-14 00:06:03 UTC (rev 10916)
@@ -8,7 +8,7 @@
<read/>
</access>
<hosturl>
- <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+ <href xmlns='DAV:'>$addressbookpath1:</href>
</hosturl>
<organizer>
<href xmlns='DAV:'>$principaluri1:</href>
Modified: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-only/3.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-only/3.xml 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-only/3.xml 2013-03-14 00:06:03 UTC (rev 10916)
@@ -3,7 +3,7 @@
<href xmlns='DAV:'>mailto:$email2:</href>
<invite-accepted/>
<hosturl>
- <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+ <href xmlns='DAV:'>$addressbookpath1:</href>
</hosturl>
<in-reply-to>$inviteuid:</in-reply-to>
<summary>The Shared Address Book</summary>
Modified: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-write/2.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-write/2.xml 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-write/2.xml 2013-03-14 00:06:03 UTC (rev 10916)
@@ -8,7 +8,7 @@
<read-write/>
</access>
<hosturl>
- <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+ <href xmlns='DAV:'>$addressbookpath1:</href>
</hosturl>
<organizer>
<href xmlns='DAV:'>$principaluri1:</href>
Modified: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-write/3.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-write/3.xml 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/read-write/3.xml 2013-03-14 00:06:03 UTC (rev 10916)
@@ -3,7 +3,7 @@
<href xmlns='DAV:'>mailto:$email2:</href>
<invite-accepted/>
<hosturl>
- <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+ <href xmlns='DAV:'>$addressbookpath1:</href>
</hosturl>
<in-reply-to>$inviteuid:</in-reply-to>
<summary>The Shared Address Book</summary>
Modified: CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-feature.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-feature.xml 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-feature.xml 2013-03-14 00:06:03 UTC (rev 10916)
@@ -27,7 +27,7 @@
</require-feature>
<start>
- <request user="$userid2:" pswd="$pswd2:">
+ <request user="$userid1:" pswd="$pswd1:">
<method>DELETE</method>
<ruri>$addressbookpath1:/</ruri>
</request>
Modified: CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-peruser-properties.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-peruser-properties.xml 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-peruser-properties.xml 2013-03-14 00:06:03 UTC (rev 10916)
@@ -27,7 +27,7 @@
</require-feature>
<start>
- <request user="$userid2:" pswd="$pswd2:">
+ <request user="$userid1:" pswd="$pswd1:">
<method>DELETE</method>
<ruri>$addressbookpath1:/</ruri>
</request>
Modified: CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-replies.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-replies.xml 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-replies.xml 2013-03-14 00:06:03 UTC (rev 10916)
@@ -27,7 +27,7 @@
</require-feature>
<start>
- <request user="$userid2:" pswd="$pswd2:">
+ <request user="$userid1:" pswd="$pswd1:">
<method>DELETE</method>
<ruri>$addressbookpath1:/</ruri>
</request>
Modified: CalendarServer/branches/users/gaya/sharedgroups/testserver
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/testserver 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalendarServer/branches/users/gaya/sharedgroups/testserver 2013-03-14 00:06:03 UTC (rev 10916)
@@ -49,7 +49,7 @@
'?') usage; ;;
'h') usage -; exit 0; ;;
't') cdt="${OPTARG}"; serverinfo="${OPTARG}/scripts/server/serverinfo.xml"; ;;
- 'd') subdir="--subdir ${OPTARG} "; ;;
+ 'd') subdir="${OPTARG}"; ;;
's') serverinfo="${OPTARG}"; ;;
'r') printres="--always-print-request --always-print-response"; ;;
'v') verbose="v"; ;;
@@ -68,5 +68,5 @@
source "${wd}/support/shell.sh";
-cd "${cdt}" && "${python}" testcaldav.py --print-details-onfail ${printres} -s "${serverinfo}" "${subdir}""$@";
+cd "${cdt}" && "${python}" testcaldav.py --print-details-onfail ${printres} -s "${serverinfo}" --subdir "${subdir}" "$@";
Modified: CalendarServer/branches/users/gaya/sharedgroups/txdav/base/propertystore/sql.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/txdav/base/propertystore/sql.py 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalendarServer/branches/users/gaya/sharedgroups/txdav/base/propertystore/sql.py 2013-03-14 00:06:03 UTC (rev 10916)
@@ -292,10 +292,11 @@
prop, Where=(prop.RESOURCE_ID == Parameter("resourceID"))
)
+ @inlineCallbacks
def _removeResource(self):
self._cached = {}
- self._deleteResourceQuery.on(self._txn, resourceID=self._resourceID)
+ yield self._deleteResourceQuery.on(self._txn, resourceID=self._resourceID)
self._cacher.delete(str(self._resourceID))
@inlineCallbacks
@@ -316,8 +317,8 @@
yield self._insertQuery.on(
self._txn, resourceID=self._resourceID, value=value_str,
name=key_str, uid=uid)
-
+
# Reload from the DB
self._cached = {}
self._cacher.delete(str(self._resourceID))
Modified: CalendarServer/branches/users/gaya/sharedgroups/txdav/carddav/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/txdav/carddav/datastore/sql.py 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalendarServer/branches/users/gaya/sharedgroups/txdav/carddav/datastore/sql.py 2013-03-14 00:06:03 UTC (rev 10916)
@@ -448,7 +448,7 @@
#yield self._deletedSyncToken()
yield self._updateRevision(self.name())
- self.properties()._removeResource()
+ yield self.properties()._removeResource()
yield self._loadPropertyStore()
self.properties()[
PropertyName.fromElement(ResourceType)
Modified: CalendarServer/branches/users/gaya/sharedgroups/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/txdav/common/datastore/sql.py 2013-03-13 22:34:21 UTC (rev 10915)
+++ CalendarServer/branches/users/gaya/sharedgroups/txdav/common/datastore/sql.py 2013-03-14 00:06:03 UTC (rev 10916)
@@ -3307,7 +3307,7 @@
yield self._deletedSyncToken()
yield self._deleteQuery.on(self._txn, NoSuchHomeChildError,
resourceID=self._resourceID)
- self.properties()._removeResource()
+ yield self.properties()._removeResource()
# Set to non-existent state
self._resourceID = None
@@ -4187,7 +4187,7 @@
def remove(self):
yield self._deleteQuery.on(self._txn, NoSuchObjectResourceError,
resourceID=self._resourceID)
- self.properties()._removeResource()
+ yield self.properties()._removeResource()
# Set to non-existent state
self._resourceID = None
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130313/e14d1901/attachment-0001.html>
More information about the calendarserver-changes
mailing list