%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/
Upload File :
Create Path :
Current File : //proc/self/root/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyo

�
5}�ac@s�dZddlZddlZddlmZmZmZmZddlmZdej	fd��YZ
de
fd��YZd	e
fd
��YZde
fd��YZ
d
�Zedkr�ejdd�ndS(s(TestCases for distributed transactions.
i����N(tdbttest_supporttget_new_environment_pathtget_new_database_path(tverbosetDBTxn_distributedcBsPeZdZeZeZd�Zd�Zd�Z	d�Z
d�Zd�ZRS(i�cCsLtj�|_|jj|j�|jj|jd�|jj|jd�|jj|jd�|jr�|jj	tj
t�n|jj|j
tjtjBtjBtjBtjBtjBtjBd�tj|j�|_|jjtj�|rH|jj�}|jj|jtjtjtjBdd|�|j�ndS(Nii�ttxn(RtDBEnvtdbenvt
set_tx_maxtnum_txnstset_lk_max_lockerstset_lk_max_lockstset_lk_max_objectstnosynct	set_flagst
DB_TXN_NOSYNCtTruetopenthomeDirt	DB_CREATEt	DB_THREADt
DB_RECOVERtDB_INIT_TXNtDB_INIT_LOGt
DB_INIT_MPOOLtDB_INIT_LOCKtDBt
set_re_lentDB_GID_SIZEt	txn_begintfilenametDB_QUEUEtcommit(tselftmust_open_dbR((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyt_create_envs$	)cCs%t�|_d|_|jdt�S(NttestR#(RRRR$R(R"((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pytsetUp's	cCsM|jstj�d dkr/|jj�n|jj�|jj�dS(Niii(ii(RRtversionRt	log_flushtclose(R"((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyt_destroy_env,s
cCs|j�tj|j�dS(N(R*RtrmtreeR(R"((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyttearDown2s
cCs|j�|j|�dS(N(R*R$(R"R#((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyt
_recreate_env6s
cCs�t�}d�}ddl}|jddkr=d�}nxt|j�D]n}|jj�}dtj}|||�}|jj	||d|dtj
�|j|�|j|�qMW~|j
|j�|jj�}|j|jt|��x$|D]\}}|j||�qW~~|j
|j�|jj�}|j|jt|��t�}t�}	d}
x�|D]�\}}|
dks�|
d	kr�|	j|�|j�nE|
d
kr�|j�n,|
dkr|j�|j|�d}
n|
d	7}
q~W~~|j
|j�|jj�}|jt|�t|��x|D]\}}|j�qWW~~|j
dt�|jj�}|jt|�d�|jt|	�|jj�d�dS(
NcSs|S(N((tx((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyt<lambda><ti����iicSs
t|d�S(Ntascii(tbytes(R.((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyR/?R0s%%%ddRtflagsiiR#tnkeys(tsettsystversion_infotxrangeR
RRRRtputt	DB_APPENDtaddtprepareR-R#ttxn_recovertassertEqualtlentassertInR!taborttdiscardRtstat(R"ttxnstadaptR6tiRtgidtrecovered_txnstdiscard_txnstcommitted_txnststate((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyttest01_distributed_transactions:sd		
"
		




	(
t__name__t
__module__R
RRtFalseR#R$R&R*R,R-RL(((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyRs					tDBTxn_distributedSYNCcBseZeZRS((RMRNROR(((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyRP�stDBTxn_distributed_must_open_dbcBseZeZRS((RMRNRR#(((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyRQ�st"DBTxn_distributedSYNC_must_open_dbcBseZeZeZRS((RMRNRORRR#(((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyRR�scCs�tj�}tj�dkrM|jtjt��|jtjt��ntj�dkr�|jtjt��|jtjt	��n|S(Niii(ii(ii(
tunittestt	TestSuiteRR'taddTestt	makeSuiteRRPRQRR(tsuite((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyt
test_suite�st__main__tdefaultTestRX(t__doc__tosRSttest_allRRRRRtTestCaseRRPRQRRRXRMtmain(((sQ/opt/plesk/python/2.7/lib64/python2.7/bsddb/test/test_distributed_transactions.pyt<module>s"r	

Zerion Mini Shell 1.0