[CalendarServer-changes] [6543] CalendarServer/branches/users/glyph/sharedpool/txdav/carddav/ datastore/test/test_sql.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Nov 1 14:29:51 PDT 2010


Revision: 6543
          http://trac.macosforge.org/projects/calendarserver/changeset/6543
Author:   glyph at apple.com
Date:     2010-11-01 14:29:47 -0700 (Mon, 01 Nov 2010)
Log Message:
-----------
only create one store

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/sharedpool/txdav/carddav/datastore/test/test_sql.py

Modified: CalendarServer/branches/users/glyph/sharedpool/txdav/carddav/datastore/test/test_sql.py
===================================================================
--- CalendarServer/branches/users/glyph/sharedpool/txdav/carddav/datastore/test/test_sql.py	2010-11-01 21:29:21 UTC (rev 6542)
+++ CalendarServer/branches/users/glyph/sharedpool/txdav/carddav/datastore/test/test_sql.py	2010-11-01 21:29:47 UTC (rev 6543)
@@ -41,7 +41,7 @@
 
     @inlineCallbacks
     def setUp(self):
-        super(AddressBookSQLStorageTests, self).setUp()
+        yield super(AddressBookSQLStorageTests, self).setUp()
         self._sqlStore = yield buildStore(self, self.notifierFactory)
         yield self.populate()
 
@@ -195,18 +195,16 @@
         Test that two concurrent attempts to PUT different address book object resources to the
         same address book home does not cause a deadlock.
         """
+        addressbookStore = yield buildStore(self, self.notifierFactory)
 
-        addressbookStore1 = yield buildStore(self, self.notifierFactory)
-        addressbookStore2 = yield buildStore(self, self.notifierFactory)
-
         # Provision the home now
-        txn = addressbookStore1.newTransaction()
+        txn = addressbookStore.newTransaction()
         home = yield txn.homeWithUID(EADDRESSBOOKTYPE, "uid1", create=True)
         self.assertNotEqual(home, None)
         yield txn.commit()
 
-        txn1 = addressbookStore1.newTransaction()
-        txn2 = addressbookStore2.newTransaction()
+        txn1 = addressbookStore.newTransaction()
+        txn2 = addressbookStore.newTransaction()
 
         home1 = yield txn1.homeWithUID(EADDRESSBOOKTYPE, "uid1", create=True)
         home2 = yield txn2.homeWithUID(EADDRESSBOOKTYPE, "uid1", create=True)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101101/38ce7779/attachment-0001.html>


More information about the calendarserver-changes mailing list