Project: lixa
Code Location: https://lixa.svn.sourceforge.net/svnroot/lixa/tests//tests
Browse
/
Download File
xa_5_47.at
AT_BANNER([XA: 5.47 xa_recover])

AT_SETUP([XA/5.47/0.0 (XAER_RMERR)])
# XAER_RMERR
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/-3
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh reset start lixar -b -p -x $(lixau -f).11111111222233334444555555555555.66666666777788889999000000000000 -c], [1], [ignore], [ignore])
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/1
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_recover/-3
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p -x $(lixau -f).11111111222233334444555555555555.66666666777788889999000000000000 -c], [1], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([XA/5.47/0.1 (XAER_RMFAIL)])
# XAER_RMFAIL
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/-7
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p -x $(lixau -f).11111111222233334444555555555555.66666666777788889999000000000000 -c], [1], [ignore], [ignore])
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/1
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_recover/-7
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p -x $(lixau -f).11111111222233334444555555555555.66666666777788889999000000000000 -c], [1], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([XA/5.47/0.2 (XAER_INVAL)])
# XAER_INVAL
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/-5
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p -x $(lixau -f).11111111222233334444555555555555.66666666777788889999000000000000 -c], [1], [ignore], [ignore])
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/1
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_recover/-5
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p -x $(lixau -f).11111111222233334444555555555555.66666666777788889999000000000000 -c], [1], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([XA/5.47/0.3 (XAER_PROTO)])
# XAER_PROTO
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/-6
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p -x $(lixau -f).11111111222233334444555555555555.66666666777788889999000000000000 -c], [1], [ignore], [ignore])
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/1
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_recover/-6
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p -x $(lixau -f).11111111222233334444555555555555.66666666777788889999000000000000 -c], [1], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([XA/5.47/0.4 (Invalid RC)])
# An invalid return code
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/-20
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p -x $(lixau -f).11111111222233334444555555555555.66666666777788889999000000000000 -c], [1], [ignore], [ignore])
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/1
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_recover/-20
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p -x $(lixau -f).11111111222233334444555555555555.66666666777788889999000000000000 -c], [1], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([XA/5.47/0.5 (R.M. answer is out of range)])
# out of range response
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/103
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p], [1], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([XA/5.47/0.6 (R.M. needs another step)])
# the value specified must be THE SAME used by client_recovery_scan function
# this test case is used to check xa_recover is called twice; if it was not,
# the xa_close call would fail with a wrong verb in liblixamonkey file
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/100
xa_recover/0
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_recover/3
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -B -p], [0], [ignore], [ignore])
# the value specified must be THE SAME used by client_recovery_scan function
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/100
xa_recover/2
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_recover/3
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -B -p], [0], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([XA/5.47/0.7 (skip other T.M.s' xids)])
# the value specified must be THE SAME used by client_recovery_scan function
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/5
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_recover/5
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset none lixar -b -p | tee $TESTS_TMP_FILE1; grep '^There are no prepared and in-doubt transactions to list' $TESTS_TMP_FILE1], [0], [ignore], [ignore])
# the value specified must be THE SAME used by client_recovery_scan function
AT_DATA([monkey1s.conf],
[[# first monkey R.M. config
xa_open/0
xa_recover/5
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# third monkey R.M. config
xa_open/0
xa_recover/5
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003_FM ; lixa_test_exec.sh noreset stop lixar -b -B -p | tee $TESTS_TMP_FILE1; grep '^xid=' $TESTS_TMP_FILE1 | wc -l | grep 10], [0], [ignore], [ignore])
AT_CLEANUP