Enable advanced Java interop tests.

Add response parameters to custom_metadata streaming request for Node and PHP
clients.

The Java server does not respond with separate initial and trailing
metadata when there is no response data - it is only emiting the
requested trailing metadata. Adding the response parameters to the test
(in accordance with the specification) avoids this, but I will open a
separate issue to investigate the Java behavior.
pull/9251/head
Eric Gribkoff 8 years ago
parent 13ac3031aa
commit ced8702d1d
  1. 3
      src/node/interop/interop_client.js
  2. 11
      src/php/tests/interop/interop_client.php
  3. 4
      tools/run_tests/run_interop_tests.py

@ -312,6 +312,9 @@ function customMetadata(client, done) {
}
};
var streaming_arg = {
response_parameters: [
{size: 314159}
],
payload: {
body: zeroBuffer(271828)
}

@ -451,11 +451,22 @@ function customMetadata($stub)
$streaming_request = new grpc\testing\StreamingOutputCallRequest();
$streaming_request->setPayload($payload);
$response_parameters = new grpc\testing\ResponseParameters();
$response_parameters->setSize($response_len);
$streaming_request->getResponseParameters()[] = $response_parameters;
$streaming_call->write($streaming_request);
$streaming_call->writesDone();
$result = $streaming_call->read();
hardAssertIfStatusOk($streaming_call->getStatus());
$streaming_initial_metadata = $streaming_call->getMetadata();
hardAssert(array_key_exists($ECHO_INITIAL_KEY, $streaming_initial_metadata),
'Initial metadata does not contain expected key');
hardAssert(
$streaming_initial_metadata[$ECHO_INITIAL_KEY][0] === $ECHO_INITIAL_VALUE,
'Incorrect initial metadata value');
$streaming_trailing_metadata = $streaming_call->getTrailingMetadata();
hardAssert(array_key_exists($ECHO_TRAILING_KEY,
$streaming_trailing_metadata),

@ -179,10 +179,10 @@ class JavaLanguage:
return {}
def unimplemented_test_cases(self):
return _SKIP_ADVANCED + _SKIP_COMPRESSION
return _SKIP_COMPRESSION
def unimplemented_test_cases_server(self):
return _SKIP_ADVANCED + _SKIP_COMPRESSION
return _SKIP_COMPRESSION
def __str__(self):
return 'java'

Loading…
Cancel
Save