Skip to content
Snippets Groups Projects
Commit ba1ab45f authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

Merge pull request #3819 from stanley-cheung/php_fix_empty_stream_interop_test

PHP: fix empty_stream interop test
parents 72c14a55 e5f41cb5
No related branches found
No related tags found
No related merge requests found
...@@ -256,15 +256,11 @@ function pingPong($stub) { ...@@ -256,15 +256,11 @@ function pingPong($stub) {
* @param $stub Stub object that has service methods. * @param $stub Stub object that has service methods.
*/ */
function emptyStream($stub) { function emptyStream($stub) {
// for the current PHP implementation, $call->read() will wait $call = $stub->FullDuplexCall();
// forever for a server response if the server is not sending any.
// so this test is imeplemented as a timeout to indicate the absence
// of receiving any response from the server
$call = $stub->FullDuplexCall(array('timeout' => 100000));
$call->writesDone(); $call->writesDone();
hardAssert($call->read() === null, 'Server returned too many responses'); hardAssert($call->read() === null, 'Server returned too many responses');
hardAssert($call->getStatus()->code === Grpc\STATUS_OK, hardAssert($call->getStatus()->code === Grpc\STATUS_OK,
'Call did not complete successfully'); 'Call did not complete successfully');
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment