tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
X\¬Qc@sÔdZddlZddlZddlZddlmZmZmZmZm    Z    yddl
Z
Wne k
runXe
j dddde ƒdejfd    „ƒYZd
„Zed krÐejd d ƒndS(sfTestCases for checking that it does not segfault when a DBEnv object
is closed before its DB objects.
iÿÿÿÿN(tdbt test_supporttverbosetget_new_environment_pathtget_new_database_pathtignoretmessagesDB could not be closed intcategorytDBEnvClosedEarlyCrashcBsYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
RS(    cCstƒ|_d|_dS(Nttest(RthomeDirtfilename(tself((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pytsetUps cCstj|jƒdS(N(RtrmtreeR
(R ((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyttearDownscCstjƒ}|j|jtjtjBtjBtjBdƒtj|ƒ}tj|ƒ}|j|j    tj
tjtjBdƒ|j tj |j|j    dtj
tjdƒ|j ddƒ|j|jdƒddƒ|jƒ|j tj|jdƒdS(Ni¶t2R    sthis is a testsput!=get(RtDBEnvtopenR
t DB_INIT_CDBt    DB_CREATEt    DB_THREADt DB_INIT_MPOOLtDBR tDB_BTREEt assertRaisestDBNoSuchFileErrortputt assertEqualtgettclosetDBError(R tdbenvtdtd2((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyttest01_close_dbenv_before_db s  &
cCsttjƒ}|j|jtjtjBtjBtjBdƒtj|ƒ}|j|j    tj
tjtjBdƒ|j ddƒ|j ddƒ|j ddƒ|j |j dƒddƒ|jƒ}|jƒ|jƒ|jƒ|jtj|jƒtj|ƒ}|j|j    tj
tjtjBdƒ|jƒ}|jƒ|jƒ|jƒ|jtj|jƒdS(    Ni¶R    sthis is a testttest2s another testttest3s another onesput!=get(RRRR
RRRRRR RRRRtcursortfirsttnextRRR(R R R!tc((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyt"test02_close_dbenv_before_dbcursor2s,  & 
 
 
& 
 
 
cCsæddl}|jj|j|jƒ}tjƒ}|j|tjtj    tj
Bdƒ|j ddƒ|j ddƒ|j ddƒ|j |j dƒdd    ƒ|jƒ}|jƒ|jƒ|jƒ|jtj|jƒdS(
Niÿÿÿÿi¶R    sthis is a testR$s another testR%s another onesput!=get(tos.pathtpathtjoinR
R RRRRRRRRRR&R'R(RRR(R tosR,R!R)((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyt+test03_close_db_before_dbcursor_without_envOs  # 
 
 
cCstjƒ}|j|jtjtjBtjBtjBdƒgtdƒD]}tj    |ƒ^qG}g}x4|D],}|j|j
tj tjtjBdƒqoW|dj ddƒ|dj ddƒ|dj dd    ƒ|j |d
jdƒdd ƒx:|D]2}|jgtd ƒD]}|jƒ^qƒqWx%|ddd …D]}|jƒqLWx%|ddd …D]}|jƒqtW|jtj|djdƒ|jtj|djƒ|djƒ|djƒ|jƒ|jtj|djƒdS(Ni¶ii
R    sthis is a testR$s another testR%s another oneisput!=geti ii    ieiP(RRRR
RRRRtxrangeRR RRRRtextendR&RRRR'R((R R titdbstcursorstj((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyttest04_close_massive`s0  ( *  0
cCs½tjƒ}|j|jtjtjBtjBtjBdƒtj|ƒ}|j|j    tj
tjtjBdƒ|j ƒ~yddl }Wnt k
r¥d}nX|r¹|jƒndS(Ni¶iÿÿÿÿ(RRRR
RRRRRR RRtgct ImportErrortNonetcollect(R R R!R7((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyt$test05_close_dbenv_delete_db_success„s  &
 
cCsotjƒ}|j|jtjtjBtjBtjBƒtj|ƒ}|j    ƒ}|j|j
dtj dtjd|ƒ|j ddd|ƒ|j ƒ|j    ƒ}|j|ƒ}|jƒ}|jd
|jƒƒddl}tjd kr|jd    ƒ|j ƒ|jƒn?|jƒ}|jƒz|jd    ƒ|j ƒWd|jƒX|jtj|jƒdS( NtdbtypetflagsttxntXXXtyyyiÿÿÿÿiiR(R?R@(ii(RRRR
t DB_INIT_TXNRt DB_INIT_LOGRRt    txn_beginR tDB_HASHRtcommitR&tdupRR'twarningstsyst version_infot simplefiltert resetwarningstcatch_warningst    __enter__t__exit__RtDBCursorClosedError(R R R!R>tc1tc2RGtw((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyt"test06_close_txn_before_dup_cursor˜s2   !
 
 
  cCs}ddl}|jj|j|jƒ}tjƒ}|j|tjtj    tj
Bdƒtj |ƒ}|j ƒ|j ƒdS(Niÿÿÿÿi¶( R+R,R-R
R RRRRRRt
DBSequenceR(R R.R,R!R3((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyttest07_close_db_before_sequenceÅs  #
( t__name__t
__module__R RR#R*R/R6R;RSRU(((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyRs                        $        -cCs&tjƒ}|jtjtƒƒ|S(N(tunittestt    TestSuitetaddTestt    makeSuiteR(tsuite((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyt
test_suiteÐs t__main__t defaultTestR](t__doc__R.RHRXttest_allRRRRRRGR8tfilterwarningstRuntimeWarningtTestCaseRR]RVtmain(((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_early_close.pyt<module>s (  ¸