From a7026d8a46fac6b877d8a52799449bdc423c2ae4 Mon Sep 17 00:00:00 2001 From: liulei Date: Fri, 25 Feb 2022 11:23:42 +0800 Subject: [PATCH] revert: undo request timeout test pb define --- test/busi/busi.pb.go | 141 ++++++++++++++++++-------------------- test/busi/busi.proto | 1 - test/busi/busi_grpc.pb.go | 36 ---------- test/saga_grpc_test.go | 2 +- 4 files changed, 68 insertions(+), 112 deletions(-) diff --git a/test/busi/busi.pb.go b/test/busi/busi.pb.go index e9c31f6..ee64b5a 100644 --- a/test/busi/busi.pb.go +++ b/test/busi/busi.pb.go @@ -148,7 +148,7 @@ var file_test_busi_busi_proto_rawDesc = []byte{ 0x6e, 0x73, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x25, 0x0a, 0x09, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x32, 0x8b, 0x0c, 0x0a, 0x04, 0x42, 0x75, 0x73, 0x69, 0x12, 0x32, 0x0a, 0x07, 0x54, 0x72, + 0x65, 0x32, 0xbe, 0x0b, 0x0a, 0x04, 0x42, 0x75, 0x73, 0x69, 0x12, 0x32, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x33, @@ -206,47 +206,42 @@ var file_test_busi_busi_proto_rawDesc = []byte{ 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x42, 0x53, 0x61, 0x67, 0x61, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x20, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x4f, 0x75, 0x74, 0x57, 0x69, 0x74, 0x68, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x0d, 0x2e, 0x62, - 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x59, 0x65, 0x73, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x4f, 0x75, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x59, 0x65, 0x73, 0x12, 0x0d, 0x2e, + 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, + 0x75, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, - 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x12, 0x37, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x52, 0x65, 0x64, 0x69, 0x73, - 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0d, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, + 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x52, 0x65, + 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, + 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0d, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, + 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, + 0x6e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, + 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, + 0x74, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, + 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, + 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, + 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, + 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x42, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x49, 0x6e, 0x52, 0x65, - 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, + 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, + 0x61, 0x72, 0x65, 0x64, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, - 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, - 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x12, 0x31, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, - 0x72, 0x65, 0x64, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, - 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, 0x73, 0x69, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x42, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, - 0x75, 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x12, 0x3d, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, - 0x64, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x0d, 0x2e, 0x62, 0x75, 0x73, 0x69, 0x2e, 0x42, 0x75, - 0x73, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, - 0x08, 0x5a, 0x06, 0x2e, 0x2f, 0x62, 0x75, 0x73, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x2f, 0x62, 0x75, 0x73, 0x69, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -284,44 +279,42 @@ var file_test_busi_busi_proto_depIdxs = []int32{ 0, // 13: busi.Busi.TransOutBSaga:input_type -> busi.BusiReq 0, // 14: busi.Busi.TransInRevertBSaga:input_type -> busi.BusiReq 0, // 15: busi.Busi.TransOutRevertBSaga:input_type -> busi.BusiReq - 0, // 16: busi.Busi.TransOutWithGlobalRequestTimeout:input_type -> busi.BusiReq - 0, // 17: busi.Busi.TransOutHeaderYes:input_type -> busi.BusiReq - 0, // 18: busi.Busi.TransOutHeaderNo:input_type -> busi.BusiReq - 0, // 19: busi.Busi.TransInRedis:input_type -> busi.BusiReq - 0, // 20: busi.Busi.TransOutRedis:input_type -> busi.BusiReq - 0, // 21: busi.Busi.TransInRevertRedis:input_type -> busi.BusiReq - 0, // 22: busi.Busi.TransOutRevertRedis:input_type -> busi.BusiReq - 0, // 23: busi.Busi.QueryPrepared:input_type -> busi.BusiReq - 0, // 24: busi.Busi.QueryPreparedB:input_type -> busi.BusiReq - 0, // 25: busi.Busi.QueryPreparedRedis:input_type -> busi.BusiReq - 2, // 26: busi.Busi.TransIn:output_type -> google.protobuf.Empty - 2, // 27: busi.Busi.TransOut:output_type -> google.protobuf.Empty - 2, // 28: busi.Busi.TransInRevert:output_type -> google.protobuf.Empty - 2, // 29: busi.Busi.TransOutRevert:output_type -> google.protobuf.Empty - 2, // 30: busi.Busi.TransInConfirm:output_type -> google.protobuf.Empty - 2, // 31: busi.Busi.TransOutConfirm:output_type -> google.protobuf.Empty - 2, // 32: busi.Busi.XaNotify:output_type -> google.protobuf.Empty - 2, // 33: busi.Busi.TransInXa:output_type -> google.protobuf.Empty - 2, // 34: busi.Busi.TransOutXa:output_type -> google.protobuf.Empty - 2, // 35: busi.Busi.TransInTcc:output_type -> google.protobuf.Empty - 2, // 36: busi.Busi.TransOutTcc:output_type -> google.protobuf.Empty - 2, // 37: busi.Busi.TransInTccNested:output_type -> google.protobuf.Empty - 2, // 38: busi.Busi.TransInBSaga:output_type -> google.protobuf.Empty - 2, // 39: busi.Busi.TransOutBSaga:output_type -> google.protobuf.Empty - 2, // 40: busi.Busi.TransInRevertBSaga:output_type -> google.protobuf.Empty - 2, // 41: busi.Busi.TransOutRevertBSaga:output_type -> google.protobuf.Empty - 2, // 42: busi.Busi.TransOutWithGlobalRequestTimeout:output_type -> google.protobuf.Empty - 2, // 43: busi.Busi.TransOutHeaderYes:output_type -> google.protobuf.Empty - 2, // 44: busi.Busi.TransOutHeaderNo:output_type -> google.protobuf.Empty - 2, // 45: busi.Busi.TransInRedis:output_type -> google.protobuf.Empty - 2, // 46: busi.Busi.TransOutRedis:output_type -> google.protobuf.Empty - 2, // 47: busi.Busi.TransInRevertRedis:output_type -> google.protobuf.Empty - 2, // 48: busi.Busi.TransOutRevertRedis:output_type -> google.protobuf.Empty - 1, // 49: busi.Busi.QueryPrepared:output_type -> busi.BusiReply - 2, // 50: busi.Busi.QueryPreparedB:output_type -> google.protobuf.Empty - 2, // 51: busi.Busi.QueryPreparedRedis:output_type -> google.protobuf.Empty - 26, // [26:52] is the sub-list for method output_type - 0, // [0:26] is the sub-list for method input_type + 0, // 16: busi.Busi.TransOutHeaderYes:input_type -> busi.BusiReq + 0, // 17: busi.Busi.TransOutHeaderNo:input_type -> busi.BusiReq + 0, // 18: busi.Busi.TransInRedis:input_type -> busi.BusiReq + 0, // 19: busi.Busi.TransOutRedis:input_type -> busi.BusiReq + 0, // 20: busi.Busi.TransInRevertRedis:input_type -> busi.BusiReq + 0, // 21: busi.Busi.TransOutRevertRedis:input_type -> busi.BusiReq + 0, // 22: busi.Busi.QueryPrepared:input_type -> busi.BusiReq + 0, // 23: busi.Busi.QueryPreparedB:input_type -> busi.BusiReq + 0, // 24: busi.Busi.QueryPreparedRedis:input_type -> busi.BusiReq + 2, // 25: busi.Busi.TransIn:output_type -> google.protobuf.Empty + 2, // 26: busi.Busi.TransOut:output_type -> google.protobuf.Empty + 2, // 27: busi.Busi.TransInRevert:output_type -> google.protobuf.Empty + 2, // 28: busi.Busi.TransOutRevert:output_type -> google.protobuf.Empty + 2, // 29: busi.Busi.TransInConfirm:output_type -> google.protobuf.Empty + 2, // 30: busi.Busi.TransOutConfirm:output_type -> google.protobuf.Empty + 2, // 31: busi.Busi.XaNotify:output_type -> google.protobuf.Empty + 2, // 32: busi.Busi.TransInXa:output_type -> google.protobuf.Empty + 2, // 33: busi.Busi.TransOutXa:output_type -> google.protobuf.Empty + 2, // 34: busi.Busi.TransInTcc:output_type -> google.protobuf.Empty + 2, // 35: busi.Busi.TransOutTcc:output_type -> google.protobuf.Empty + 2, // 36: busi.Busi.TransInTccNested:output_type -> google.protobuf.Empty + 2, // 37: busi.Busi.TransInBSaga:output_type -> google.protobuf.Empty + 2, // 38: busi.Busi.TransOutBSaga:output_type -> google.protobuf.Empty + 2, // 39: busi.Busi.TransInRevertBSaga:output_type -> google.protobuf.Empty + 2, // 40: busi.Busi.TransOutRevertBSaga:output_type -> google.protobuf.Empty + 2, // 41: busi.Busi.TransOutHeaderYes:output_type -> google.protobuf.Empty + 2, // 42: busi.Busi.TransOutHeaderNo:output_type -> google.protobuf.Empty + 2, // 43: busi.Busi.TransInRedis:output_type -> google.protobuf.Empty + 2, // 44: busi.Busi.TransOutRedis:output_type -> google.protobuf.Empty + 2, // 45: busi.Busi.TransInRevertRedis:output_type -> google.protobuf.Empty + 2, // 46: busi.Busi.TransOutRevertRedis:output_type -> google.protobuf.Empty + 1, // 47: busi.Busi.QueryPrepared:output_type -> busi.BusiReply + 2, // 48: busi.Busi.QueryPreparedB:output_type -> google.protobuf.Empty + 2, // 49: busi.Busi.QueryPreparedRedis:output_type -> google.protobuf.Empty + 25, // [25:50] is the sub-list for method output_type + 0, // [0:25] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/test/busi/busi.proto b/test/busi/busi.proto index 3c5ecd9..72a92b6 100644 --- a/test/busi/busi.proto +++ b/test/busi/busi.proto @@ -35,7 +35,6 @@ service Busi { rpc TransOutBSaga(BusiReq) returns (google.protobuf.Empty) {} rpc TransInRevertBSaga(BusiReq) returns (google.protobuf.Empty) {} rpc TransOutRevertBSaga(BusiReq) returns (google.protobuf.Empty) {} - rpc TransOutWithGlobalRequestTimeout(BusiReq) returns (google.protobuf.Empty) {} rpc TransOutHeaderYes(BusiReq) returns (google.protobuf.Empty) {} rpc TransOutHeaderNo(BusiReq) returns (google.protobuf.Empty) {} diff --git a/test/busi/busi_grpc.pb.go b/test/busi/busi_grpc.pb.go index 6de70fc..21828f1 100644 --- a/test/busi/busi_grpc.pb.go +++ b/test/busi/busi_grpc.pb.go @@ -39,7 +39,6 @@ type BusiClient interface { TransOutBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) TransInRevertBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) TransOutRevertBSaga(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) - TransOutWithGlobalRequestTimeout(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) TransOutHeaderYes(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) TransOutHeaderNo(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) TransInRedis(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) @@ -203,15 +202,6 @@ func (c *busiClient) TransOutRevertBSaga(ctx context.Context, in *BusiReq, opts return out, nil } -func (c *busiClient) TransOutWithGlobalRequestTimeout(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/busi.Busi/TransOutWithGlobalRequestTimeout", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *busiClient) TransOutHeaderYes(ctx context.Context, in *BusiReq, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/busi.Busi/TransOutHeaderYes", in, out, opts...) @@ -313,7 +303,6 @@ type BusiServer interface { TransOutBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) TransInRevertBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) TransOutRevertBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) - TransOutWithGlobalRequestTimeout(context.Context, *BusiReq) (*emptypb.Empty, error) TransOutHeaderYes(context.Context, *BusiReq) (*emptypb.Empty, error) TransOutHeaderNo(context.Context, *BusiReq) (*emptypb.Empty, error) TransInRedis(context.Context, *BusiReq) (*emptypb.Empty, error) @@ -378,9 +367,6 @@ func (UnimplementedBusiServer) TransInRevertBSaga(context.Context, *BusiReq) (*e func (UnimplementedBusiServer) TransOutRevertBSaga(context.Context, *BusiReq) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutRevertBSaga not implemented") } -func (UnimplementedBusiServer) TransOutWithGlobalRequestTimeout(context.Context, *BusiReq) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method TransOutWithGlobalRequestTimeout not implemented") -} func (UnimplementedBusiServer) TransOutHeaderYes(context.Context, *BusiReq) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method TransOutHeaderYes not implemented") } @@ -709,24 +695,6 @@ func _Busi_TransOutRevertBSaga_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Busi_TransOutWithGlobalRequestTimeout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BusiReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BusiServer).TransOutWithGlobalRequestTimeout(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/busi.Busi/TransOutWithGlobalRequestTimeout", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BusiServer).TransOutWithGlobalRequestTimeout(ctx, req.(*BusiReq)) - } - return interceptor(ctx, in, info, handler) -} - func _Busi_TransOutHeaderYes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(BusiReq) if err := dec(in); err != nil { @@ -960,10 +928,6 @@ var Busi_ServiceDesc = grpc.ServiceDesc{ MethodName: "TransOutRevertBSaga", Handler: _Busi_TransOutRevertBSaga_Handler, }, - { - MethodName: "TransOutWithGlobalRequestTimeout", - Handler: _Busi_TransOutWithGlobalRequestTimeout_Handler, - }, { MethodName: "TransOutHeaderYes", Handler: _Busi_TransOutHeaderYes_Handler, diff --git a/test/saga_grpc_test.go b/test/saga_grpc_test.go index 70fd731..94f1732 100644 --- a/test/saga_grpc_test.go +++ b/test/saga_grpc_test.go @@ -114,7 +114,7 @@ func TestSagaGrpcWithGlobalTransRequestTimeout(t *testing.T) { gid := dtmimp.GetFuncName() saga := dtmgrpc.NewSagaGrpc(dtmutil.DefaultGrpcServer, gid) saga.WaitResult = true - saga.Add(busi.BusiGrpc+"/busi.Busi/TransOutWithGlobalRequestTimeout", "", nil) + saga.Add(busi.BusiGrpc+"/busi.Busi/TransOutHeaderNo", "", nil) saga.WithGlobalTransRequestTimeout(6) err := saga.Submit() assert.Nil(t, err)