0%

实习-05-YTS测试用例

YTS测试

参考文档链接如下

https://uap-wiki.yyrd.com/pages/viewpage.action?pageId=177940639#yts%E5%88%86%E5%B8%83%E5%BC%8F%E4%BA%8B%E5%8A%A1%E6%B5%8B%E8%AF%95%E7%94%A8%E4%BE%8B%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3-3.2.2Httpclient-tcc%E8%B0%83%E7%94%A8:

image-20230213142706813

调用方式:http://bip-daily.yyuap.com/http-send-demo/http/httpClientSave?uid=7&amount=20&orderId=02&ytsMode=tcc

3.2.2.1 无桩情况

通过查询所有节点status状态是否为confirmed;

查询语句:

select * from yts-http-client.yts_trans_xxxx where gtx_id=’#####’ ;

select * from yts-http-client.yts_rel_xxxx where gtx_id=’#####’ ;

数据库 期望状态
yts-http-client trans confirmed
rel confirmed
yts-http-provider trans confirmed
rel confirmed
yts-http-provider trans confirmed
rel confirmed

1.点击调用链接http://bip-daily.yyuap.com/http-send-demo/http/httpClientSave?uid=7&amount=20&orderId=02&ytsMode=tcc

出现如下结果:

image-20230213142821202

1
{"orderId":"02","gtxId":"20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b","message":"付款成功,请到对应库中验证"}

2.查询结果

1
select * from `yts-http-client`.yts_trans_20230213 where gtx_id='20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b';

pk, id, module_name, service_name, method_name, gtx_id, tx_id, ptx_id, cancel_method, type, status, create_time, interface_name, update_time, confirm_method, reported, context, env, call_tag, provider_id, invocation, all_confirmed, mode, retry_status, bill_no, trace_id, rule_id

‘139’, ‘ef8887d3-5bb3-45fb-af9d-18e39569120b’, ‘http-send-demo’, ‘http-send-demo’, ‘GET’, ‘20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b’, ‘59c4d67a-39a4-4e3b-ad56-75503bdd26f5’, NULL, NULL, ‘ROOT’, ‘CONFIRMED’, ‘1676268435439’, ‘com.yonyou.ucf.mdd.api.interfaces.rpc.IRuleApi’, ‘1676268451304’, NULL, ‘’, ‘{"rootProviderId":"c87e2267-1001-4c70-bb2a-ab41f3b81aa3","rootServiceName":"http-send-demo"}’, ‘combine’, NULL, ‘c87e2267-1001-4c70-bb2a-ab41f3b81aa3’, ?, ‘0’, ‘httpClient_tcc’, NULL, NULL, ‘1602eb0fceb13732’, ‘/yts-http-demo/yts/httpClientTccSave’

1
select * from `yts-http-client`.yts_rel_20230213 where gtx_id='20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b';

pk, id, module_name, call_service_name, call_interface_name, call_method_name, service_name, interface_name, method_name, gtx_id, ptx_id, tx_id, cancel_method, invocation, cancel_invocation, provider_id, server_provider_id, create_time, update_time, confirm_method, env, parent_pk, call_tag, mode, retry_count, status, retry_status, reported, bill_no, trace_id, rule_id, confirm

139‘, ‘2f00baa6-6b22-4489-bac2-da9095c820dc’, ‘http://bip-daily.yyuap.com', ‘http-send-demo’, NULL, NULL, ‘http://bip-daily.yyuap.com', ‘/yts-http-demo/yts/httpClientTccSave’, ‘GET‘, ‘20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b‘, ‘59c4d67a-39a4-4e3b-ad56-75503bdd26f5‘, ‘6f8e15fc-f9b2-4545-b022-2c2f422340e9‘, ‘cancel’, ?, ?, ‘c87e2267-1001-4c70-bb2a-ab41f3b81aa3’, NULL, ‘1676268435504’, ‘1676268451238’, NULL, ‘combine’, ‘139’, NULL, ‘httpClient_tcc’, ‘1’, ‘CONFIRMED‘, NULL, NULL, NULL, NULL, NULL, ‘0’

1
select * from `yts-http-provider`.yts_trans_20230213 where gtx_id='20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b';

pk, id, module_name, service_name, method_name, gtx_id, tx_id, ptx_id, cancel_method, type, status, create_time, interface_name, update_time, confirm_method, reported, context, env, call_tag, provider_id, invocation, all_confirmed, mode, retry_status, bill_no, trace_id, rule_id

214‘, ‘e7dac527-896c-4be6-9a47-dc6034b927fd’, ‘yts-http-provider’, ‘yts-http-provider’, ‘GET’, ‘20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b‘, ‘6f8e15fc-f9b2-4545-b022-2c2f422340e9‘, ‘59c4d67a-39a4-4e3b-ad56-75503bdd26f5‘, NULL, ‘BRANCH’, ‘CONFIRMED‘, ‘1676268450611’, ‘com.yonyou.ucf.mdd.api.interfaces.rpc.IRuleApi’, ‘1676268451184’, NULL, ‘’, ‘{"rootProviderId":"c87e2267-1001-4c70-bb2a-ab41f3b81aa3","rootServiceName":"http-send-demo"}’, ‘combine’, ‘’, ‘c87e2267-1001-4c70-bb2a-ab41f3b81aa3’, ?, ‘0’, ‘httpClient_tcc’, ‘’, NULL, ‘237b53c582d36d47’, ‘/yts/httpClientTccSave’

1
select * from `yts-http-provider`.yts_rel_20230213 where gtx_id='20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b';

pk, id, module_name, call_service_name, call_interface_name, call_method_name, service_name, interface_name, method_name, gtx_id, ptx_id, tx_id, cancel_method, invocation, cancel_invocation, provider_id, server_provider_id, create_time, update_time, confirm_method, env, parent_pk, call_tag, mode, retry_count, status, retry_status, reported, bill_no, trace_id, rule_id, confirm

101‘, ‘6d7efcc1-9e9b-4a2a-95cf-d63987502461’, ‘http://bip-daily.yyuap.com', ‘yts-http-provider’, NULL, NULL, ‘http://bip-daily.yyuap.com', ‘/yts-http-privider2/yts/httpClientTccSave’, ‘GET’, ‘20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b’, ‘6f8e15fc-f9b2-4545-b022-2c2f422340e9’, ‘649a5ace-30f3-4ab6-bf77-6efced96ff1f‘, ‘cancel’, ?, ?, ‘c87e2267-1001-4c70-bb2a-ab41f3b81aa3’, NULL, ‘1676268450678’, ‘1676268451096’, NULL, ‘combine’, ‘214’, NULL, ‘httpClient_tcc’, ‘1’, ‘CONFIRMED’, NULL, NULL, NULL, NULL, NULL, ‘0’

1
select * from `yts-http-provider2`.yts_trans_20230213 where gtx_id='20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b';

pk, id, module_name, service_name, method_name, gtx_id, tx_id, ptx_id, cancel_method, type, status, create_time, interface_name, update_time, confirm_method, reported, context, env, call_tag, provider_id, invocation, all_confirmed, mode, retry_status, bill_no, trace_id, rule_id

158‘, ‘afa9ae81-cc3f-45d9-8bae-a6b8f48c32d4’, ‘yts-http-privider2’, ‘yts-http-privider2’, ‘GET’, ‘20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b‘, ‘649a5ace-30f3-4ab6-bf77-6efced96ff1f‘, ‘6f8e15fc-f9b2-4545-b022-2c2f422340e9‘, NULL, ‘BRANCH’, ‘CONFIRMED‘, ‘1676268450745’, ‘com.yonyou.ucf.mdd.api.interfaces.rpc.IRuleApi’, ‘1676268451070’, NULL, ‘’, ‘{"rootProviderId":"c87e2267-1001-4c70-bb2a-ab41f3b81aa3","rootServiceName":"http-send-demo"}’, ‘combine’, ‘’, ‘c87e2267-1001-4c70-bb2a-ab41f3b81aa3’, ?, ‘0’, ‘httpClient_tcc’, ‘’, NULL, ‘a7f0390cf8ce46e0’, ‘/yts/httpClientTccSave’

1
select * from `yts-http-provider2`.yts_rel_20230213 where gtx_id='20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b';

没查到,表是空表

trans

yts-http-client yts-http-provider ‘yts-http-privider2’
gtx_id 20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b 20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b 20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b
tx_id 59c4d67a-39a4-4e3b-ad56-75503bdd26f5 6f8e15fc-f9b2-4545-b022-2c2f422340e9 649a5ace-30f3-4ab6-bf77-6efced96ff1f
ptx_id NULL 59c4d67a-39a4-4e3b-ad56-75503bdd26f5 6f8e15fc-f9b2-4545-b022-2c2f422340e9

rel

yts-http-client yts-http-provider ‘yts-http-privider2’
gtx_id 20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b 20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b 20230213140715@98ff5cb0-7060-46c1-87c5-523ca58fb99b
tx_id 59c4d67a-39a4-4e3b-ad56-75503bdd26f5 6f8e15fc-f9b2-4545-b022-2c2f422340e9
ptx_id 6f8e15fc-f9b2-4545-b022-2c2f422340e9 649a5ace-30f3-4ab6-bf77-6efced96ff1f