Skip to content

Commit 98e5a38

Browse files
author
Nathan Mittler
committed
Merge pull request grpc#137 from nmittler/test_protos
Updating integ test protos to be consistent with C
2 parents fc55f8b + 0e7685b commit 98e5a38

File tree

2 files changed

+74
-21
lines changed

2 files changed

+74
-21
lines changed
Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,36 @@
1+
2+
// Copyright 2015, Google Inc.
3+
// All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are
7+
// met:
18
//
2-
// Copyright 2014 Google Inc. All rights reserved.
9+
// * Redistributions of source code must retain the above copyright
10+
// notice, this list of conditions and the following disclaimer.
11+
// * Redistributions in binary form must reproduce the above
12+
// copyright notice, this list of conditions and the following disclaimer
13+
// in the documentation and/or other materials provided with the
14+
// distribution.
15+
// * Neither the name of Google Inc. nor the names of its
16+
// contributors may be used to endorse or promote products derived from
17+
// this software without specific prior written permission.
318
//
4-
// Use of this source code is governed by a BSD-style
5-
// license that can be found in the LICENSE file or at
6-
// https://developers.google.com/open-source/licenses/bsd
19+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
731
syntax = "proto2";
832

9-
package proto2;
33+
package grpc.testing;
1034

1135
option java_package = "com.google.protobuf";
1236
option java_outer_classname = "EmptyProtos";
@@ -16,7 +40,7 @@ option java_outer_classname = "EmptyProtos";
1640
// return value of a service API. For instance:
1741
//
1842
// service Foo {
19-
// rpc Bar (proto2.Empty) returns (proto2.Empty) { };
43+
// rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { };
2044
// };
21-
message Empty {}
22-
45+
//
46+
message Empty {}

integration-testing/src/main/proto/io/grpc/testing/integration/messages.proto

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
1+
2+
// Copyright 2015, Google Inc.
3+
// All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are
7+
// met:
18
//
2-
// Copyright 2014 Google Inc. All rights reserved.
9+
// * Redistributions of source code must retain the above copyright
10+
// notice, this list of conditions and the following disclaimer.
11+
// * Redistributions in binary form must reproduce the above
12+
// copyright notice, this list of conditions and the following disclaimer
13+
// in the documentation and/or other materials provided with the
14+
// distribution.
15+
// * Neither the name of Google Inc. nor the names of its
16+
// contributors may be used to endorse or promote products derived from
17+
// this software without specific prior written permission.
318
//
4-
// Use of this source code is governed by a BSD-style
5-
// license that can be found in the LICENSE file or at
6-
// https://developers.google.com/open-source/licenses/bsd
19+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
31+
// Message definitions to be used by integration test service definitions.
32+
733
syntax = "proto3";
834

9-
package stubby.testing;
35+
package grpc.testing;
1036

1137
option java_package = "io.grpc.testing.integration";
1238

@@ -22,7 +48,7 @@ enum PayloadType {
2248
RANDOM = 2;
2349
}
2450

25-
// A block of data, to simply increase message size.
51+
// A block of data, to simply increase gRPC message size.
2652
message Payload {
2753
// The type of data in body.
2854
optional PayloadType type = 1;
@@ -42,6 +68,12 @@ message SimpleRequest {
4268

4369
// Optional input payload sent along with the request.
4470
optional Payload payload = 3;
71+
72+
// Whether SimpleResponse should include username.
73+
optional bool fill_username = 4;
74+
75+
// Whether SimpleResponse should include OAuth scope.
76+
optional bool fill_oauth_scope = 5;
4577
}
4678

4779
// Unary response, as configured by the request.
@@ -50,11 +82,9 @@ message SimpleResponse {
5082
optional Payload payload = 1;
5183
// The user the request came from, for verifying authentication was
5284
// successful when the client expected it.
53-
optional int64 effective_gaia_user_id = 2;
54-
}
55-
56-
message SimpleContext {
57-
optional string value = 1;
85+
optional string username = 2;
86+
// OAuth scope.
87+
optional string oauth_scope = 3;
5888
}
5989

6090
// Client-streaming request.
@@ -101,5 +131,4 @@ message StreamingOutputCallRequest {
101131
message StreamingOutputCallResponse {
102132
// Payload to increase response size.
103133
optional Payload payload = 1;
104-
}
105-
134+
}

0 commit comments

Comments
 (0)