aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php
diff options
context:
space:
mode:
authorGravatar Stanley Cheung <stanleycheung@google.com>2015-08-18 16:19:38 -0700
committerGravatar Stanley Cheung <stanleycheung@google.com>2015-08-19 12:31:59 -0700
commitc0c9ba9e429cb6aac2653f16cf171bf0c64920c8 (patch)
tree3c1d7f76cdbb567207a59fa1351e67973a2ba709 /src/php
parent89bede02f16905eb48b71710dc4ea2542b3a5ca1 (diff)
php: fix timeout interop test, use 1ms as timeout
Diffstat (limited to 'src/php')
-rw-r--r--src/php/ext/grpc/call.c11
-rwxr-xr-xsrc/php/tests/interop/interop_client.php2
2 files changed, 3 insertions, 10 deletions
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c
index 4e40dc43ce..6009a8d2b8 100644
--- a/src/php/ext/grpc/call.c
+++ b/src/php/ext/grpc/call.c
@@ -273,7 +273,6 @@ PHP_METHOD(Call, startBatch) {
grpc_byte_buffer *message;
int cancelled;
grpc_call_error error;
- grpc_event event;
zval *result;
char *message_str;
size_t message_len;
@@ -409,14 +408,8 @@ PHP_METHOD(Call, startBatch) {
(long)error TSRMLS_CC);
goto cleanup;
}
- event = grpc_completion_queue_pluck(completion_queue, call->wrapped,
- gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
- if (!event.success) {
- zend_throw_exception(spl_ce_LogicException,
- "The batch failed for some reason",
- 1 TSRMLS_CC);
- goto cleanup;
- }
+ grpc_completion_queue_pluck(completion_queue, call->wrapped,
+ gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
for (int i = 0; i < op_num; i++) {
switch(ops[i].op) {
case GRPC_OP_SEND_INITIAL_METADATA:
diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php
index 44e6242c29..376d306da0 100755
--- a/src/php/tests/interop/interop_client.php
+++ b/src/php/tests/interop/interop_client.php
@@ -271,7 +271,7 @@ function cancelAfterFirstResponse($stub) {
}
function timeoutOnSleepingServer($stub) {
- $call = $stub->FullDuplexCall(array('timeout' => 500000));
+ $call = $stub->FullDuplexCall(array('timeout' => 1000));
$request = new grpc\testing\StreamingOutputCallRequest();
$request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
$response_parameters = new grpc\testing\ResponseParameters();