Project: lixa
Code Location: https://lixa.svn.sourceforge.net/svnroot/lixa/tests//tests
Browse
/
Download File
tx_5_27.at
AT_BANNER([TX: 5.27 tx_rollback()])

# All the test cases test thid condition too:
# [TX_PROTOCOL_ERROR]
# The function was called in an improper context (for example, the caller is
# not in transaction mode). The caller.s state with respect to the transaction
# is not changed.

AT_SETUP([TX/5.27/0.0])
# [TX_NO_BEGIN]
# The transaction rolled back; however, a new transaction could not be started
# and the caller is no longer in transaction mode. This return value occurs
# only when the transaction_control characteristic is TX_CHAINED.
AT_DATA([monkey1s.conf],
[[# monkey R.M. config
xa_open/0
xa_start/0
xa_end/0
xa_rollback/0
xa_start/-3
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# monkey R.M. config
xa_open/0
xa_end/0
xa_rollback/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003 ; lixa_test_exec.sh noreset start case0019 1 -100], [0], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([TX/5.27/0.1])
# [TX_MIXED]
# The transaction was partially committed and partially rolled back. In
# addition, if the transaction_control characteristic is TX_CHAINED, a new
# transaction is started.
AT_DATA([monkey1s.conf],
[[# monkey R.M. config
xa_open/0
xa_start/0
xa_end/0
xa_rollback/7
xa_forget/0
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# monkey R.M. config
xa_open/0
xa_end/0
xa_rollback/-3
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003 ; lixa_test_exec.sh noreset none case0019 0 -3], [0], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([TX/5.27/0.2])
# [TX_MIXED_NO_BEGIN]
# The transaction was partially committed and partially rolled back. In
# addition, a new transaction could not be started and the caller is no longer
# in transaction mode. This return value can occur only when the
# transaction_control characteristic is TX_CHAINED.
AT_DATA([monkey1s.conf],
[[# monkey R.M. config
xa_open/0
xa_start/0
xa_end/0
xa_rollback/7
xa_forget/0
xa_start/-3
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# monkey R.M. config
xa_open/0
xa_end/0
xa_rollback/-3
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003 ; lixa_test_exec.sh noreset none case0019 1 -103], [0], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([TX/5.27/0.3])
# [TX_HAZARD]
# Due to a failure, the transaction may have been partially committed and
# partially rolled back. In addition, if the transaction_control
# characteristic is TX_CHAINED, a new transaction is started. 
AT_DATA([monkey1s.conf],
[[# monkey R.M. config
xa_open/0
xa_start/0
xa_end/0
xa_rollback/8
xa_forget/0
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# monkey R.M. config
xa_open/0
xa_end/0
xa_rollback/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003 ; lixa_test_exec.sh noreset none case0019 0 -4], [0], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([TX/5.27/0.4])
# TX_HAZARD_NO_BEGIN]
# Due to a failure, the transaction may have been partially committed and
# partially rolled back. In addition, a new transaction could not be started
# and the caller is no longer in transaction mode. This return value can occur
# only when the transaction_control characteristic is TX_CHAINED.
AT_DATA([monkey1s.conf],
[[# monkey R.M. config
xa_open/0
xa_start/0
xa_end/0
xa_rollback/8
xa_forget/0
xa_start/-3
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# monkey R.M. config
xa_open/0
xa_end/0
xa_rollback/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003 ; lixa_test_exec.sh noreset none case0019 1 -104], [0], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([TX/5.27/0.5])
# [TX_COMMITTED]
# The transaction was heuristically committed. In addition, if the
# transaction_control characteristic is TX_CHAINED, a new transaction is
# started.
AT_DATA([monkey1s.conf],
[[# monkey R.M. config
xa_open/0
xa_start/0
xa_end/0
xa_rollback/7
xa_forget/0
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# monkey R.M. config
xa_open/0
xa_end/0
xa_rollback/7
xa_forget/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003 ; lixa_test_exec.sh noreset none case0019 0 -9], [0], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([TX/5.27/0.6])
# [TX_COMMITTED_NO_BEGIN]
# The transaction was heuristically committed. In addition, a new transaction
# could not be started and the caller is no longer in transaction mode. This
# return value can occur only when the transaction_control characteristic is
# TX_CHAINED.
AT_DATA([monkey1s.conf],
[[# monkey R.M. config
xa_open/0
xa_start/0
xa_end/0
xa_rollback/7
xa_forget/0
xa_start/-3
xa_close/0
]])
AT_DATA([monkey1d.conf],
[[# monkey R.M. config
xa_open/0
xa_end/0
xa_rollback/7
xa_forget/0
xa_close/0
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003 ; lixa_test_exec.sh noreset none case0019 1 -109], [0], [ignore], [ignore])
AT_CLEANUP

AT_SETUP([TX/5.27/0.7])
# [TX_FAIL]
# Either the transaction manager or one or more of the resource managers
# encountered a fatal error. The nature of the error is such that the
# transaction manager and/or one or more of the resource managers can no
# longer perform work on behalf of the application. The exact nature of the
# error is determined in a product-specific manner. The caller's state with
# respect to the transaction is unknown.
AT_DATA([monkey1s.conf],
[[# monkey R.M. config
xa_open/0
xa_start/0
xa_end/0
xa_rollback/0
]])
AT_DATA([monkey1d.conf],
[[# monkey R.M. config
xa_open/0
xa_end/0
xa_rollback/-7
]])
AT_CHECK([export LIXA_PROFILE=CASE_PROF_0003 ; lixa_test_exec.sh noreset stop case0019 0 -7], [0], [ignore], [ignore])
AT_CLEANUP