From bad6977de82b732a4d9e5daae97e82dee741a8d3 Mon Sep 17 00:00:00 2001 From: yedf2 <120050102@qq.com> Date: Wed, 11 Aug 2021 18:50:38 +0800 Subject: [PATCH] cover more --- test/grpc_xa_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/grpc_xa_test.go b/test/grpc_xa_test.go index 5f7f2da..9ebc957 100644 --- a/test/grpc_xa_test.go +++ b/test/grpc_xa_test.go @@ -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) {