Project:
lixa
Code Location:
https://lixa.svn.sourceforge.net/svnroot/lixa/tests//tests
/
xa_5_30.at
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
AT_BANNER([XA: 5.30 xa_close]) # The argument xa_info points to a null-terminated character string that may # contain instance-specific information for the resource manager. The maximum # length of this string is 256 bytes (including the null terminator). The # argument xa_info may point to an empty string if the resource manager does # not require instance-specific information to be available. The argument # xa_info must not be a null pointer. # # Configured string is 256 characters length, but only 255 can be used and # this test case checks it AT_SETUP([XA/5.30/0.0 (xa_info)]) AT_CHECK([export LIXA_PROFILE=CASE_PROF_0008 ; lixa_test_exec.sh reset start case0022 0 0 2>$TESTS_TMP_FILE1], [0], [ignore], [ignore]) AT_CHECK([cat $TESTS_TMP_FILE1 | tee $TESTS_TMP_FILE2 && grep "lixa_dummyrm_close: xa_info='123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345'" $TESTS_TMP_FILE2], [0], [ignore], [ignore]) AT_CLEANUP # What's happen with an empty xa_info string? This case test checks is! AT_SETUP([XA/5.30/0.1 (xa_info)]) AT_CHECK([export LIXA_PROFILE=CASE_PROF_0009 ; lixa_test_exec.sh noreset none case0022 0 0 2>$TESTS_TMP_FILE1], [0], [ignore], [ignore]) AT_CHECK([cat $TESTS_TMP_FILE1 | tee $TESTS_TMP_FILE2 && grep "lixa_dummyrm_close: xa_info=''" $TESTS_TMP_FILE2], [0], [ignore], [ignore]) AT_CLEANUP # Checks return code result AT_SETUP([XA/5.30/1.0 (return values)]) # XA_OK AT_DATA([monkey1s.conf], [[# monkey R.M.config xa_open/0 xa_close/0 ]]) AT_CHECK([export LIXA_PROFILE=CASE_PROF_0007 ; lixa_test_exec.sh noreset none case0022 0 0], [0], [ignore], [ignore]) # XAER_ASYNC AT_DATA([monkey1s.conf], [[# monkey R.M.config xa_open/0 xa_close/-2 ]]) AT_CHECK([export LIXA_PROFILE=CASE_PROF_0007 ; lixa_test_exec.sh noreset none case0022 0 -7], [0], [ignore], [ignore]) # XAER_RMERR AT_DATA([monkey1s.conf], [[# monkey R.M.config xa_open/0 xa_close/-3 ]]) AT_CHECK([export LIXA_PROFILE=CASE_PROF_0007 ; lixa_test_exec.sh noreset none case0022 0 -6], [0], [ignore], [ignore]) # XAER_INVAL AT_DATA([monkey1s.conf], [[# monkey R.M.config xa_open/0 xa_close/-5 ]]) AT_CHECK([export LIXA_PROFILE=CASE_PROF_0007 ; lixa_test_exec.sh noreset none case0022 0 -7], [0], [ignore], [ignore]) # XAER_PROTO AT_DATA([monkey1s.conf], [[# monkey R.M.config xa_open/0 xa_close/-6 ]]) AT_CHECK([export LIXA_PROFILE=CASE_PROF_0007 ; lixa_test_exec.sh noreset none case0022 0 -7], [0], [ignore], [ignore]) # Invalid XA return code AT_DATA([monkey1s.conf], [[# monkey R.M.config xa_open/0 xa_close/-20 ]]) AT_CHECK([export LIXA_PROFILE=CASE_PROF_0007 ; lixa_test_exec.sh noreset stop case0022 0 -7], [0], [ignore], [ignore]) AT_CLEANUP
