-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature add tcc branch report #186
Conversation
applicationData) | ||
|
||
assert.Nil(t, err) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
assert.Nil(t, err) | ||
|
||
log.Infof("err: %+v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.Infof("err: %+v", err) |
@@ -34,3 +37,19 @@ func TestActionContext(t *testing.T) { | |||
assert.Nil(t, err) | |||
assert.Equal(t, `{"zhangsan":"lisi"}`, string(bytes)) | |||
} | |||
|
|||
func TestBranchReport(t *testing.T) { | |||
rmInstance := GetTCCResourceManagerInstance() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rmInstance := GetTCCResourceManagerInstance() |
func TestBranchReport(t *testing.T) { | ||
rmInstance := GetTCCResourceManagerInstance() | ||
applicationData := `{"actionContext":{"zhangsan":"lisi"}}` | ||
err := rmInstance.BranchReport( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err := rmInstance.BranchReport( | |
err := GetTCCResourceManagerInstance().BranchReport(context.Background(), branch.BranchTypeTCC, "1111111111", |
|
||
func TestBranchReport(t *testing.T) { | ||
rmInstance := GetTCCResourceManagerInstance() | ||
applicationData := `{"actionContext":{"zhangsan":"lisi"}}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applicationData := `{"actionContext":{"zhangsan":"lisi"}}` |
branch.BranchTypeTCC, | ||
"1111111111", | ||
2645276141, | ||
branch.BranchStatusPhaseoneDone, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branch.BranchStatusPhaseoneDone, |
context.Background(), | ||
branch.BranchTypeTCC, | ||
"1111111111", | ||
2645276141, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2645276141, | |
2645276141, branch.BranchStatusPhaseoneDone, `{"actionContext":{"zhangsan":"lisi"}}`) |
err := rmInstance.BranchReport( | ||
context.Background(), | ||
branch.BranchTypeTCC, | ||
"1111111111", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"1111111111", |
applicationData := `{"actionContext":{"zhangsan":"lisi"}}` | ||
err := rmInstance.BranchReport( | ||
context.Background(), | ||
branch.BranchTypeTCC, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
branch.BranchTypeTCC, |
rmInstance := GetTCCResourceManagerInstance() | ||
applicationData := `{"actionContext":{"zhangsan":"lisi"}}` | ||
err := rmInstance.BranchReport( | ||
context.Background(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context.Background(), |
"encoding/json" | ||
"github.com/seata/seata-go/pkg/common/log" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format the imports
-->
What this PR does:
1:添加 tcc branchReport 调用
2:添加 branchReport 单元测试
Which issue(s) this PR fixes:
1: 规范 error 命名
2: 修复 const 枚举错误
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: