cover more

This commit is contained in:
yedf2 2021-08-11 18:50:38 +08:00
parent de899e39d5
commit bad6977de8

View File

@ -23,6 +23,14 @@ func TestGrpcXa(t *testing.T) {
func xaGrpcType(t *testing.T) {
_, err := dtmgrpc.XaGrpcFromRequest(&dtmgrpc.BusiRequest{Info: &dtmgrpc.BranchInfo{}})
assert.Error(t, err)
err = examples.XaGrpcClient.XaLocalTransaction(&dtmgrpc.BusiRequest{Info: &dtmgrpc.BranchInfo{}}, nil)
assert.Error(t, err)
err = dtmcli.CatchP(func() {
examples.XaGrpcClient.XaGlobalTransaction("id1", func(xa *dtmgrpc.XaGrpc) error { panic(fmt.Errorf("hello")) })
})
assert.Error(t, err)
}
func xaGrpcLocalError(t *testing.T) {