Skip to content

Commit

Permalink
Merge pull request grpc#2984 from stanley-cheung/php_fix_timeout_test
Browse files Browse the repository at this point in the history
php: fix timeout interop test
  • Loading branch information
tbetbetbe committed Aug 19, 2015
2 parents e710e2b + c0c9ba9 commit 690e010
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions src/php/ext/grpc/call.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/php/tests/interop/interop_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 690e010

Please sign in to comment.