(tc testgrpc.TestServiceClient, t *testing.T)
| 821 | } |
| 822 | |
| 823 | func doServerSideFailedUnaryCall(tc testgrpc.TestServiceClient, t *testing.T) { |
| 824 | const smallSize = 1 |
| 825 | const largeSize = 2000 |
| 826 | |
| 827 | largePayload, err := newPayload(testpb.PayloadType_COMPRESSABLE, largeSize) |
| 828 | if err != nil { |
| 829 | t.Fatal(err) |
| 830 | } |
| 831 | req := &testpb.SimpleRequest{ |
| 832 | ResponseType: testpb.PayloadType_COMPRESSABLE, |
| 833 | ResponseSize: int32(smallSize), |
| 834 | Payload: largePayload, |
| 835 | } |
| 836 | ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) |
| 837 | defer cancel() |
| 838 | if _, err := tc.UnaryCall(ctx, req); err == nil || status.Code(err) != codes.ResourceExhausted { |
| 839 | t.Fatalf("TestService/UnaryCall(_, _) = _, %v, want _, error code: %s", err, codes.ResourceExhausted) |
| 840 | } |
| 841 | } |
| 842 | |
| 843 | func doClientSideInitiatedFailedStream(tc testgrpc.TestServiceClient, t *testing.T) { |
| 844 | ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) |
no test coverage detected