From 1065452f3264c2133af20cf23fcaa9e90586b6c5 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Mon, 17 Oct 2016 12:05:55 -0700 Subject: [PATCH] Fix php interop client for status_code_and_message test --- src/php/tests/interop/interop_client.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php index 124d3249138..72012a49d0a 100755 --- a/src/php/tests/interop/interop_client.php +++ b/src/php/tests/interop/interop_client.php @@ -477,9 +477,11 @@ function statusCodeAndMessage($stub) list($result, $status) = $call->wait(); hardAssert($status->code === 2, - 'Received unexpected status code'); + 'Received unexpected UnaryCall status code: ' . + $status->code); hardAssert($status->details === 'test status message', - 'Received unexpected status details'); + 'Received unexpected UnaryCall status details: ' . + $status->details); $streaming_call = $stub->FullDuplexCall(); @@ -487,12 +489,15 @@ function statusCodeAndMessage($stub) $streaming_request->setResponseStatus($echo_status); $streaming_call->write($streaming_request); $streaming_call->writesDone(); + $result = $streaming_call->read(); $status = $streaming_call->getStatus(); hardAssert($status->code === 2, - 'Received unexpected status code'); + 'Received unexpected FullDuplexCall status code: ' . + $status->code); hardAssert($status->details === 'test status message', - 'Received unexpected status details'); + 'Received unexpected FullDuplexCall status details: ' . + $status->details); } function unimplementedMethod($stub)