incubator-seata-go
incubator-seata-go copied to clipboard
add rm test
What this PR does: Related to issue-135 add tests for resourcemanager
Which issue(s) this PR fixes:
add test: tcc_service_test.go rm_remoting_test.go
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Hi guy, @complone why the fields of TwoPhaseAction need to export?
Hi guy, @complone why the fields of TwoPhaseAction need to export?
In the mock data stage of tcc_service_test, I need to expose fields for assignment.
and the test is still being added, I will fix the ci in a week
and the test is still being added, I will fix the ci in a week
You can use reflection to get values, preferably without modifying field visibility for unit tests
CI is failed
CI is failed
As mentioned, will be fixed it within a week
The reason why Ci hangs up at present is because the test of the global transaction involves the network IO of getty communication and is investigating how to mock the listener server
RoBot detected the issue body's language is not English, translate it automatically. π―ππ»π§βπ€βπ§π«π§πΏβπ€βπ§π»π©πΎβπ€βπ¨πΏπ¬πΏ
At present, because the test of the global transaction involves the network IO of getty communication, how to mock the listener server is being investigated.
Codecov Report
Merging #192 (9054b4e) into master (0cb9e30) will increase coverage by
1.10%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #192 +/- ##
==========================================
+ Coverage 47.57% 48.68% +1.10%
==========================================
Files 56 56
Lines 2806 2806
==========================================
+ Hits 1335 1366 +31
+ Misses 1407 1375 -32
- Partials 64 65 +1
| Impacted Files | Coverage Ξ | |
|---|---|---|
| pkg/rm/two_phase.go | 69.86% <100.00%> (+2.28%) |
:arrow_up: |
| pkg/rm/tcc/tcc_service.go | 71.25% <0.00%> (+5.62%) |
:arrow_up: |
| pkg/rm/rm_remoting.go | 7.14% <0.00%> (+7.14%) |
:arrow_up: |
| pkg/rm/rm_cache.go | 84.61% <0.00%> (+84.61%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.