[ZODB-Dev] tcp_begin in tests

Antonio Beamud Montero antonio.beamud at linkend.net
Wed Jul 6 13:57:27 EDT 2005


Hi all:
In my app, I'm using ZODB to store data, the problem is that I have
implemented several unittest, for every unit test I create the ZODB
database and when the test finished I destroy the database (including
files). When I run 2 test, the first is executed ok, but the second test
give me the next Exception:
        
Traceback (most recent call last):
  File "./test_collector.py", line 240, in runTest
    self.collect = Collector(conf)
  File "/usr/lib/python2.3/site-packages/mylib/collector.py", line 78,
in __init__
    get_transaction().commit()
  File "/opt/zope/lib/python/ZODB/Transaction.py", line 232, in commit
    self._commit_begin(jars, subjars, subtransaction)
  File "/opt/zope/lib/python/ZODB/Transaction.py", line 340, in
_commit_begin
     jar.tpc_begin(self)
  File "/opt/zope/lib/python/ZODB/Connection.py", line 692, in tpc_begin
    self._storage.tpc_begin(transaction)
AttributeError: 'NoneType' object has no attribute 'tpc_begin'
        
To shutdown the class containing the ZODB connection:
        
  def shutdown(self):
        self.db.close()
        self.storage.close()
        return
        
But, if I execute only the second test, all works ok...
I've try to debug the problem, but the ZODB code is very deep and
complex...
        
Can anybody help me?
        
ZODB3-3.2
python-2.3.3
Linux Suse 9.1
        
Thanks




More information about the ZODB-Dev mailing list