[CalendarServer-changes] [6205] CalendarServer/trunk/txdav

source_changes at macosforge.org source_changes at macosforge.org
Mon Aug 30 12:17:51 PDT 2010


Revision: 6205
          http://trac.macosforge.org/projects/calendarserver/changeset/6205
Author:   cdaboo at apple.com
Date:     2010-08-30 12:17:50 -0700 (Mon, 30 Aug 2010)
Log Message:
-----------
Add some docstrings.

Modified Paths:
--------------
    CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py
    CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py

Modified: CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py	2010-08-30 18:10:57 UTC (rev 6204)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py	2010-08-30 19:17:50 UTC (rev 6205)
@@ -190,6 +190,12 @@
 
     @inlineCallbacks
     def test_homeProvisioningConcurrency(self):
+        """
+        Test that two concurrent attempts to provision a calendar home do not cause a race-condition
+        whereby the second commit results in a second INSERT that violates a unique constraint. Also verify
+        that, whilst the two provisioning attempts are happening and doing various lock operations, that we
+        do not block other reads of the table.
+        """
 
         calendarStore1 = yield buildStore(self, self.notifierFactory)
         calendarStore2 = yield buildStore(self, self.notifierFactory)
@@ -199,7 +205,8 @@
         txn2 = calendarStore2.newTransaction()
         txn3 = calendarStore3.newTransaction()
         
-        # Provision one home now
+        # Provision one home now - we will use this to later verify we can do reads of
+        # existing data in the table
         home_uid2 = txn3.homeWithUID(ECALENDARTYPE, "uid2", create=True)
         self.assertNotEqual(home_uid2, None)
         txn3.commit()

Modified: CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py
===================================================================
--- CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py	2010-08-30 18:10:57 UTC (rev 6204)
+++ CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py	2010-08-30 19:17:50 UTC (rev 6205)
@@ -77,6 +77,12 @@
 
     @inlineCallbacks
     def test_homeProvisioningConcurrency(self):
+        """
+        Test that two concurrent attempts to provision an addressbook home do not cause a race-condition
+        whereby the second commit results in a second INSERT that violates a unique constraint. Also verify
+        that, whilst the two provisioning attempts are happening and doing various lock operations, that we
+        do not block other reads of the table.
+        """
 
         addressbookStore1 = yield buildStore(self, self.notifierFactory)
         addressbookStore2 = yield buildStore(self, self.notifierFactory)
@@ -86,7 +92,8 @@
         txn2 = addressbookStore2.newTransaction()
         txn3 = addressbookStore3.newTransaction()
         
-        # Provision one home now
+        # Provision one home now - we will use this to later verify we can do reads of
+        # existing data in the table
         home_uid2 = txn3.homeWithUID(EADDRESSBOOKTYPE, "uid2", create=True)
         self.assertNotEqual(home_uid2, None)
         txn3.commit()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100830/9b9bd399/attachment-0001.html>


More information about the calendarserver-changes mailing list