Merge branch 'master' of https://github.com/grpc/grpc into zookeeper

pull/2549/head
Hongwei Wang 9 years ago
commit ef91e8f0b4
  1. 42
      build.json
  2. 131
      doc/interop-test-descriptions.md
  3. 12
      test/core/end2end/gen_build_json.py
  4. 2
      tools/buildgen/plugins/expand_bin_attrs.py
  5. 27
      tools/run_tests/run_tests.py
  6. 3696
      tools/run_tests/tests.json

@ -1008,6 +1008,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -1025,6 +1027,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -1042,6 +1046,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -1089,6 +1095,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -1106,6 +1114,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -1579,6 +1589,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -1775,6 +1787,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -1792,6 +1806,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -1809,6 +1825,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -1929,6 +1947,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -1949,6 +1969,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -2010,6 +2032,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -2251,6 +2275,8 @@
"grpc++_test_config"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -2272,6 +2298,8 @@
"grpc++_test_config"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -2289,6 +2317,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -2396,6 +2426,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -2417,6 +2449,8 @@
"grpc++_test_config"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -2438,6 +2472,8 @@
"grpc++_test_config"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -2535,6 +2571,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -2587,6 +2625,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},
@ -2607,6 +2647,8 @@
"gpr"
],
"platforms": [
"mac",
"linux",
"posix"
]
},

@ -55,7 +55,7 @@ Server features:
Procedure:
1. Client calls EmptyCall with the default Empty message
Asserts:
Client asserts:
* call was successful
* response is non-null
@ -84,7 +84,7 @@ Procedure:
}
```
Asserts:
Client asserts:
* call was successful
* response payload type is COMPRESSABLE
* response payload body is 314159 bytes in size
@ -110,6 +110,7 @@ Procedure:
}
}
```
3. Client then sends:
```
@ -119,6 +120,7 @@ Procedure:
}
}
```
4. Client then sends:
```
@ -128,6 +130,7 @@ Procedure:
}
}
```
5. Client then sends:
```
@ -137,9 +140,10 @@ Procedure:
}
}
```
6. Client halfCloses
Asserts:
6. Client half-closes
Client asserts:
* call was successful
* response aggregated_payload_size is 74922
@ -172,7 +176,7 @@ Procedure:
}
```
Asserts:
Client asserts:
* call was successful
* exactly four responses
* response payloads are COMPRESSABLE
@ -202,6 +206,7 @@ Procedure:
}
}
```
2. After getting a reply, it sends:
```
@ -215,6 +220,7 @@ Procedure:
}
}
```
3. After getting a reply, it sends:
```
@ -228,6 +234,7 @@ Procedure:
}
}
```
4. After getting a reply, it sends:
```
@ -242,7 +249,9 @@ Procedure:
}
```
Asserts:
5. After getting a reply, client half-closes
Client asserts:
* call was successful
* exactly four responses
* response payloads are COMPRESSABLE
@ -261,7 +270,7 @@ Server features:
Procedure:
1. Client calls FullDuplexCall and then half-closes
Asserts:
Client asserts:
* call was successful
* exactly zero responses
@ -300,7 +309,7 @@ Procedure:
}
```
Asserts:
Client asserts:
* call was successful
* received SimpleResponse.username equals the value of `--default_service_account` flag
* received SimpleResponse.oauth_scope is in `--oauth_scope`
@ -328,7 +337,7 @@ Server features:
* [Echo OAuth Scope][]
Procedure:
1. Client configures the channel to use ServiceAccountCredentials.
1. Client configures the channel to use ServiceAccountCredentials
2. Client calls UnaryCall with:
```
@ -343,7 +352,7 @@ Procedure:
}
```
Asserts:
Client asserts:
* call was successful
* received SimpleResponse.username is in the json key file read from
`--service_account_key_file`
@ -370,7 +379,7 @@ Server features:
* [Echo OAuth Scope][]
Procedure:
1. Client configures the channel to use JWTTokenCredentials.
1. Client configures the channel to use JWTTokenCredentials
2. Client calls UnaryCall with:
```
@ -384,7 +393,7 @@ Procedure:
}
```
Asserts:
Client asserts:
* call was successful
* received SimpleResponse.username is in the json key file read from
`--service_account_key_file`
@ -422,7 +431,7 @@ Server features:
Procedure:
1. Client uses the auth library to obtain an authorization token
2. Client configures the channel to use AccessTokenCredentials with the access token obtained in step 1.
2. Client configures the channel to use AccessTokenCredentials with the access token obtained in step 1
3. Client calls UnaryCall with the following message
```
@ -431,8 +440,8 @@ Procedure:
fill_oauth_scope: true
}
```
Asserts:
Client asserts:
* call was successful
* received SimpleResponse.username is in the json key file used by the auth
library to obtain the authorization token
@ -464,10 +473,10 @@ Server features:
Procedure:
1. Client uses the auth library to obtain an authorization token
2. Client configures the channel with just SSL credentials.
2. Client configures the channel with just SSL credentials
3. Client calls UnaryCall, setting per-call credentials to
AccessTokenCredentials with the access token obtained in step 1. The request is
the following message
AccessTokenCredentials with the access token obtained in step 1. The request
is the following message
```
{
@ -475,8 +484,8 @@ Procedure:
fill_oauth_scope: true
}
```
Asserts:
Client asserts:
* call was successful
* received SimpleResponse.username is in the json key file used by the auth
library to obtain the authorization token
@ -496,8 +505,14 @@ Server features:
* [Echo Metadata][]
Procedure:
1. While sending custom metadata (ascii + binary) in the header, client calls
UnaryCall with:
1. The client attaches custom metadata with the following keys and values:
```
key: "x-grpc-test-echo-initial", value: "test_initial_metadata_value"
key: "x-grpc-test-echo-trailing-bin", value: 0xababab
```
to a UnaryCall with request:
```
{
@ -508,23 +523,41 @@ Procedure:
}
}
```
The client attaches custom metadata with the following keys and values:
2. The client attaches custom metadata with the following keys and values:
```
key: "x-grpc-test-echo-initial", value: "test_initial_metadata_value"
key: "x-grpc-test-echo-trailing-bin", value: 0xababab
```
2. Client repeats step 1. with FullDuplexCall instead of UnaryCall.
Asserts:
to a FullDuplexCall with request:
```
{
response_type: COMPRESSABLE
response_size: 314159
payload:{
body: 271828 bytes of zeros
}
}
```
and then half-closes
Client asserts:
* call was successful
* metadata with key `"x-grpc-test-echo-initial"` and value `"test_initial_metadata_value"`is received in the initial metadata.
* metadata with key `"x-grpc-test-echo-trailing-bin"` and value `0xababab` is received in the trailing metadata.
* metadata with key `"x-grpc-test-echo-initial"` and value
`"test_initial_metadata_value"`is received in the initial metadata for calls
in Procedure steps 1 and 2.
* metadata with key `"x-grpc-test-echo-trailing-bin"` and value `0xababab` is
received in the trailing metadata for calls in Procedure steps 1 and 2.
### status_code_and_message
This test verifies unary calls succeed in sending messages, and propagates back
This test verifies unary calls succeed in sending messages, and propagate back
status code and message sent along with the messages.
Server features:
@ -543,12 +576,26 @@ Procedure:
}
}
```
2. Client repeats step 1. with FullDuplexCall instead of UnaryCall.
2. Client calls FullDuplexCall with:
```
{
response_status:{
code: 2
message: "test status message"
}
}
```
and then half-closes
Asserts:
* received status code is the same with sent code
* received status message is the same with sent message
Client asserts:
* received status code is the same as the sent code for both Procedure steps 1
and 2
* received status message is the same as the sent message for both Procedure
steps 1 and 2
### unimplemented_method
@ -556,15 +603,19 @@ Status: Ready for implementation. Blocking beta.
This test verifies calling unimplemented RPC method returns the UNIMPLEMENTED status code.
Server features:
N/A
Procedure:
* Client calls `grpc.testing.UnimplementedService/UnimplementedCall` with an empty request (defined as `grpc.testing.Empty`):
* Client calls `grpc.testing.UnimplementedService/UnimplementedCall` with an
empty request (defined as `grpc.testing.Empty`):
```
{
}
```
Asserts:
Client asserts:
* received status code is 12 (UNIMPLEMENTED)
* received status message is empty or null/unset
@ -580,7 +631,7 @@ Procedure:
1. Client starts StreamingInputCall
2. Client immediately cancels request
Asserts:
Client asserts:
* Call completed with status CANCELLED
### cancel_after_first_response
@ -606,9 +657,10 @@ Procedure:
}
}
```
2. After receiving a response, client cancels request
Asserts:
Client asserts:
* Call completed with status CANCELLED
### timeout_on_sleeping_server
@ -620,7 +672,8 @@ Server features:
* [FullDuplexCall][]
Procedure:
1. Client calls FullDuplexCall with the following request and sets its timeout to 1ms.
1. Client calls FullDuplexCall with the following request and sets its timeout
to 1ms
```
{
@ -630,7 +683,9 @@ Procedure:
}
```
Asserts:
2. Client waits
Client asserts:
* Call completed with status DEADLINE_EXCEEDED.
### concurrent_large_unary

@ -37,10 +37,10 @@ import collections
FixtureOptions = collections.namedtuple('FixtureOptions', 'fullstack includes_proxy dns_resolver secure platforms')
default_unsecure_fixture_options = FixtureOptions(True, False, True, False, ['windows', 'posix'])
default_unsecure_fixture_options = FixtureOptions(True, False, True, False, ['windows', 'linux', 'mac', 'posix'])
socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False)
default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True)
uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['posix'])
uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix'])
# maps fixture name to whether it requires the security library
END2END_FIXTURES = {
@ -48,11 +48,11 @@ END2END_FIXTURES = {
'chttp2_fullstack': default_unsecure_fixture_options,
'chttp2_fullstack_compression': default_unsecure_fixture_options,
'chttp2_fullstack_uds_posix': uds_fixture_options,
'chttp2_fullstack_uds_posix_with_poll': uds_fixture_options,
'chttp2_fullstack_with_poll': default_unsecure_fixture_options._replace(platforms=['posix']),
'chttp2_fullstack_uds_posix_with_poll': uds_fixture_options._replace(platforms=['linux']),
'chttp2_fullstack_with_poll': default_unsecure_fixture_options._replace(platforms=['linux']),
'chttp2_fullstack_with_proxy': default_unsecure_fixture_options._replace(includes_proxy=True),
'chttp2_simple_ssl_fullstack': default_secure_fixture_options,
'chttp2_simple_ssl_fullstack_with_poll': default_secure_fixture_options._replace(platforms=['posix']),
'chttp2_simple_ssl_fullstack_with_poll': default_secure_fixture_options._replace(platforms=['linux']),
'chttp2_simple_ssl_fullstack_with_proxy': default_secure_fixture_options._replace(includes_proxy=True),
'chttp2_simple_ssl_with_oauth2_fullstack': default_secure_fixture_options,
'chttp2_socket_pair': socketpair_unsecure_fixture_options,
@ -138,7 +138,7 @@ def main():
'language': 'c',
'secure': 'check' if END2END_FIXTURES[f].secure else 'no',
'src': ['test/core/end2end/fixtures/%s.c' % f],
'platforms': [ 'posix' ] if f.endswith('_posix') else END2END_FIXTURES[f].platforms,
'platforms': [ 'linux', 'mac', 'posix' ] if f.endswith('_posix') else END2END_FIXTURES[f].platforms,
'deps': sec_deps if END2END_FIXTURES[f].secure else unsec_deps,
'headers': ['test/core/end2end/end2end_tests.h'],
}

@ -47,5 +47,5 @@ def mako_plugin(dictionary):
for tgt in targets:
tgt['flaky'] = tgt.get('flaky', False)
tgt['platforms'] = tgt.get('platforms', ['windows', 'posix'])
tgt['platforms'] = sorted(tgt.get('platforms', ['windows', 'posix']))

@ -54,6 +54,17 @@ os.chdir(ROOT)
_FORCE_ENVIRON_FOR_WRAPPERS = {}
def platform_string():
if platform.system() == 'Windows':
return 'windows'
elif platform.system() == 'Darwin':
return 'mac'
elif platform.system() == 'Linux':
return 'linux'
else:
return 'posix'
# SimpleConfig: just compile with CONFIG=config, and run the binary to test
class SimpleConfig(object):
@ -109,17 +120,13 @@ class CLanguage(object):
def __init__(self, make_target, test_lang):
self.make_target = make_target
if platform.system() == 'Windows':
plat = 'windows'
else:
plat = 'posix'
self.platform = plat
self.platform = platform_string()
with open('tools/run_tests/tests.json') as f:
js = json.load(f)
self.binaries = [tgt
for tgt in js
if tgt['language'] == test_lang and
plat in tgt['platforms']]
platform_string() in tgt['platforms']]
def test_specs(self, config, travis):
out = []
@ -245,11 +252,7 @@ class RubyLanguage(object):
class CSharpLanguage(object):
def __init__(self):
if platform.system() == 'Windows':
plat = 'windows'
else:
plat = 'posix'
self.platform = plat
self.platform = platform_string()
def test_specs(self, config, travis):
assemblies = ['Grpc.Core.Tests',
@ -263,7 +266,7 @@ class CSharpLanguage(object):
return [config.job_spec([cmd, assembly],
None, shortname=assembly,
environ=_FORCE_ENVIRON_FOR_WRAPPERS)
for assembly in assemblies ]
for assembly in assemblies]
def make_targets(self):
# For Windows, this target doesn't really build anything,

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save