mò Sã¸Ec@s÷dkZdkZdkZdkZdklZdkZdkZdkl Z l Z l Z dk l Z dklZdZd„Zdeifd„ƒYZd efd „ƒYZd efd „ƒYZd efd„ƒYZdfd„ƒYZdS(N(sPersistentMapping(s zodb_pickles zodb_unpickleshandle_serials(sMinPO(s ConflictErrorf0.01cCs|iƒ|S(s#Sort a list in place and return it.N(tltsort(R((t3/data/zmath/zope/lib/python/ZODB/tests/MTStorage.pyRs t TestThreadcBs,tZdZd„Zd„Zed„ZRS(s*Base class for defining threads that run from unittest. If the thread exits with an uncaught exception, catch it and re-raise it when the thread is joined. The re-raise will cause the test to fail. The subclass should define a runtest() method instead of a run() method. cCstii|ƒd|_dS(N(t threadingtThreadt__init__tselftNonet _exc_info(R((RR!scCs+y|iƒWntiƒ|_nXdS(N(Rtruntesttsystexc_infoR (R((Rtrun%scCsFtii||ƒ|io%|id|id|id‚ndS(Niii(RRtjoinRttimeoutR (RR((RR+s (t__name__t __module__t__doc__RR RR(((RRs   tZODBClientThreadcBs;tZeiZded„Zd„Zd„Zd„ZRS(Ni cCs?|iƒ|idƒ||_||_||_||_dS(Ni(Rt_ZODBClientThread__super_initt setDaemontdbttesttcommitstdelay(RRRRR((RR4s      cCs¨|iiƒ}|iƒ|iƒ}|i|ƒ}|djo|i i ƒn+x't |i ƒD]}|i||ƒqbW|i it|iƒƒt |i ƒƒdS(N(RRtopentconntsynctroottget_thread_dicttdRRtfailtrangeRtitcommitt assertEqualRtkeys(RRR"RR((RR <s   cCs>tiƒ||R=((RR7{s   cCsti|iƒdS(N(R&R(RR(R((Rtpause‚scCs |iiƒ}d|i|<|S(N(RR4tnew_oidR:RR5(RR:((RR:…s cCsÛtt|iƒ|fƒƒ}tiƒ}|i ƒ}|i ƒ|i i |ƒ|i ƒ|i i |d|d|ƒ}|i ƒ|i i|ƒ}|i ƒ|i i|ƒ|i ƒt|||ƒ}||i|~}|ptd|i‚|i dƒx>t |i dƒD])}t i|ƒ}|ƒ|i |ƒq–W|iƒdS( Ntdo_loadtdo_modifiedInVersiont do_loadSerialt do_undoLogt do_iterators Didn't find an storage ops in %sii(tnamesRR4t supportsUndot_[1]tmethtgetattrtopstAssertionErrorR6R!RR"trandomtchoiceR7(RRZR"RWRURX((RR ¢s * cCsti|iiƒƒS(N(R\R]RR5R%(R((Rtpick_oid³scCs#|iƒ}|ii|dƒdS(NR8(RR^R:R4R<(RR:((RRP¶s cCs*|iƒ}|ii||i|ƒdS(N(RR^R:R4t loadSerialR5(RR:((RRRºs cCs |iƒ}|ii|ƒdS(N(RR^R:R4tmodifiedInVersion(RR:((RRQ¾s cCs|iiddƒdS(Niiìÿÿÿ(RR4tundoLog(R((RRSÂscCsBy|iiƒ}Wntj o dSnXx|D]}q4WdS(N(RR4titeratortitertAttributeErrorR@(RR@Rc((RRTÅs ( RRR R^RPRRRQRSRT(((RRO s      t MTStoragecBsDtZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(sCTest a storage with multiple client threads executing concurrently.cGs‘g}t|ƒD]}|||Œq~}x|D]}|iƒq4Wx|D]}|i dƒqOWx$|D]}|i |i ƒdƒqmWdS(Ni<s%thread failed to finish in 60 seconds( RWR!tnR"t constructortargstthreadsRGtstartRRtfailIftisAlive(RRfRgRhR"RWRiRG((Rt_checkNThreadsÒs-cCs6ti|iƒ}|idt||ƒ|iƒdS(Ni(tZODBtDBRt_storageRRmRtclose(RR((Rtcheck2ZODBThreadsÛscCs6ti|iƒ}|idt||ƒ|iƒdS(Ni(RnRoRRpRRmRRq(RR((Rtcheck7ZODBThreadsàscCs|idt|i|ƒdS(Ni(RRmR2Rp(R((Rtcheck2StorageThreadsåscCs|idt|i|ƒdS(Ni(RRmR2Rp(R((Rtcheck7StorageThreadsèscCs|idt|i|ƒdS(Ni(RRmRORp(R((Rtcheck4ExtStorageThreadës( RRRRmRrRsRtRuRv(((RReÏs     (R\R RR&tpersistent.mappingR-R)RntZODB.tests.StorageTestBaseRDR?RNtZODB.tests.MinPOREtZODB.POSExceptionR.R1RRRRR2RORe(RR)RDR2RR\R.ROReR RRNRnRR-R&R1R?RE((Rt?s          :6/