Browse Source

cover more

pull/25/head
yedf2 5 years ago
parent
commit
bad6977de8
  1. 8
      test/grpc_xa_test.go

8
test/grpc_xa_test.go

@ -23,6 +23,14 @@ func TestGrpcXa(t *testing.T) {
func xaGrpcType(t *testing.T) { func xaGrpcType(t *testing.T) {
_, err := dtmgrpc.XaGrpcFromRequest(&dtmgrpc.BusiRequest{Info: &dtmgrpc.BranchInfo{}}) _, err := dtmgrpc.XaGrpcFromRequest(&dtmgrpc.BusiRequest{Info: &dtmgrpc.BranchInfo{}})
assert.Error(t, err) 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) { func xaGrpcLocalError(t *testing.T) {

Loading…
Cancel
Save