[Zope3-checkins] CVS: Zope3/src/zodb/tests - test_connection.py:1.3 test_invalidation.py:1.3 test_pool.py:1.2 test_zodb.py:1.4
Jeremy Hylton
jeremy@zope.com
Tue, 25 Feb 2003 13:55:35 -0500
Update of /cvs-repository/Zope3/src/zodb/tests
In directory cvs.zope.org:/tmp/cvs-serv23205/src/zodb/tests
Modified Files:
test_connection.py test_invalidation.py test_pool.py
test_zodb.py
Log Message:
Merge the ZODB3-2-integration branch to the trunk.
The primary changes here are to port the many new ZEO features from
ZODB 3.2. There are also many changes to the test suite.
python2.2 tells me: Ran 3755 tests in 560.277s
=== Zope3/src/zodb/tests/test_connection.py 1.2 => 1.3 ===
--- Zope3/src/zodb/tests/test_connection.py:1.2 Wed Dec 25 09:12:21 2002
+++ Zope3/src/zodb/tests/test_connection.py Tue Feb 25 13:55:04 2003
@@ -16,7 +16,8 @@
from persistence import Persistent
from transaction.tests.abstestIDataManager import IDataManagerTests
-from zodb.storage.mapping import DB
+from zodb.db import DB
+from zodb.storage.mapping import MappingStorage
from zodb.ztransaction import Transaction
class P(Persistent):
@@ -25,7 +26,7 @@
class ConnectionTests(IDataManagerTests):
def setUp(self):
- self.db = DB()
+ self.db = DB(MappingStorage())
self.datamgr = self.db.open()
self.obj = P()
self.txn_factory = Transaction
=== Zope3/src/zodb/tests/test_invalidation.py 1.2 => 1.3 ===
--- Zope3/src/zodb/tests/test_invalidation.py:1.2 Tue Jan 21 13:19:56 2003
+++ Zope3/src/zodb/tests/test_invalidation.py Tue Feb 25 13:55:04 2003
@@ -69,5 +69,24 @@
root = cn.root()
self.assertEqual(root[1].value, 2)
+ def testReadConflict(self):
+ # If an object is modified after a transaction begins and the
+ # transaction reads the object, it should get a read conflict.
+ pass
+
+ def testReadConflictIgnored(self):
+ # If an application gets a read conflict and ignores it, the
+ # data manager for the object should refuse to commit the
+ # transaction.
+ pass
+
+ def testAtomicInvalidations(self):
+ # Invalidations must be delivered atomically. If several
+ # objects are modified by a transaction, other transactions
+ # should apply all the invalidations at once. Otherwise, a
+ # mix of out-of-date and current object revisions could be
+ # read.
+ pass
+
def test_suite():
return unittest.makeSuite(InvalidationTests)
=== Zope3/src/zodb/tests/test_pool.py 1.1 => 1.2 ===
--- Zope3/src/zodb/tests/test_pool.py:1.1 Tue Jan 21 13:19:56 2003
+++ Zope3/src/zodb/tests/test_pool.py Tue Feb 25 13:55:04 2003
@@ -17,7 +17,8 @@
import time
import unittest
-from zodb.storage.mapping import DB
+from zodb.db import DB
+from zodb.storage.mapping import MappingStorage
class Counter:
@@ -60,7 +61,7 @@
def setUp(self):
self.close = threading.Event()
- self.db = DB(pool_size=7)
+ self.db = DB(MappingStorage(), pool_size=7)
self.threads = []
def tearDown(self):
=== Zope3/src/zodb/tests/test_zodb.py 1.3 => 1.4 ===
--- Zope3/src/zodb/tests/test_zodb.py:1.3 Tue Jan 28 11:42:23 2003
+++ Zope3/src/zodb/tests/test_zodb.py Tue Feb 25 13:55:04 2003
@@ -15,7 +15,8 @@
import unittest
import tempfile
-from zodb.storage.file import DB
+from zodb.db import DB
+from zodb.storage.file import FileStorage
from zodb.utils import u64
from zodb.tests.undo import TransactionalUndoDB
from persistence.dict import PersistentDict
@@ -105,7 +106,7 @@
unittest.TestCase):
def setUp(self):
- self._db = DB(_fsname, create=1)
+ self._db = DB(FileStorage(_fsname, create=True))
self._conn = self._db.open()
self._root = self._conn.root()