mς SγΈEc@s‘dkZdkZdkZdkZdkZdklZdkZdkZdk l Z d„Z dei fd„ƒYZ d„Zd„ZdS(N(sdoctest(sMinPOcCs4tg}|iƒD]}|t|iƒq~ƒS(N(tsumt_[1]tpoolstvaluestpooltlentall(RRR((t0/data/zmath/zope/lib/python/ZODB/tests/testDB.pytnconnstDBTestscBsJtZd„Zd„Zdd„Zd„Zd„Zd„Zd„ZRS( NcCs@tiidƒ|_tii|iƒ}ti|ƒ|_ dS(Nstest.fs( tostpathtabspathtselft_DBTests__pathtZODBt FileStoragetstoretDBtdb(R R((RtsetUp"scCsT|iiƒx@dD]8}tii|i|ƒoti|i|ƒqqWdS(Nts.indexs.locks.tmp(Rs.indexs.locks.tmp( R RtclosetsR R texistsRtremove(R R((RttearDown's  RcCs‰|ii|ƒ}|iƒ}tdƒ}|t i ƒs$      cCsO|iƒ|idƒx1|iidƒ}|iidƒ|iƒqWdS(NR,iR-(R R(RRR.R3R(R R.((Rt_test_for_leak\s  cCsa|iƒ|idƒ|iidƒ}|iƒ|iidƒ}|i||jƒ|ii}|i t |ƒdƒ|i t |ƒdƒ|ii dƒ|i t |ƒdƒ|i t |ƒdƒ|iƒ|i t |ƒdƒ|i t |ƒdƒ|iidƒ}|iƒ|i||j ƒ|i t |ƒdƒ|i t |ƒdƒdS(NR,R-ii(R R(RRR.RR/R0R1RR2RRR3(R RR/R.((Rt,test_removeVersionPool_while_connection_opends(      ( t__name__t __module__RRR(R+R4R5R6(((RR s     cCsdS(s The invalidateCache method invalidates a connection caches for all of the connections attached to a database. >>> from ZODB.tests.util import DB >>> import transaction >>> db = DB() >>> tm1 = transaction.TransactionManager() >>> c1 = db.open(transaction_manager=tm1) >>> c1.root()['a'] = MinPO(1) >>> tm1.commit() >>> tm2 = transaction.TransactionManager() >>> c2 = db.open(transaction_manager=tm2) >>> c1.root()['a']._p_deactivate() >>> tm3 = transaction.TransactionManager() >>> c3 = db.open(transaction_manager=tm3) >>> c3.root()['a'].value 1 >>> c3.close() >>> db.invalidateCache() >>> c1.root()['a'].value Traceback (most recent call last): ... ReadConflictError: database read conflict error >>> c2.root()['a'].value Traceback (most recent call last): ... ReadConflictError: database read conflict error >>> c3 is db.open(transaction_manager=tm3) True >>> print c3.root()['a']._p_changed None >>> db.close() N((((Rttest_invalidateCache‡s&cCs&titƒ}|itiƒƒ|S(N(tunittestt makeSuiteR RtaddTesttdoctestt DocTestSuite(R((Rt test_suite±s(R R"R:twarningsR#t zope.testingR=RtZODB.FileStoragetZODB.tests.MinPOR RtTestCaseR R9R?( R#R@R:R RR=R9R"R?R RR ((Rt?s          g *