fixed small issue in run_tests.sh and remove duplicate in CallTest.php

pull/17728/head
Jerry 6 years ago
parent 7c58a8ae76
commit d098a0dabc
  1. 9
      src/php/bin/run_tests.sh
  2. 10
      src/php/tests/unit_tests/CallTest.php

@ -32,9 +32,8 @@ php $extension_dir -d max_execution_time=300 $(which phpunit) -v --debug \
export ZEND_DONT_UNLOAD_MODULES=1
export USE_ZEND_ALLOC=0
# Detect whether valgrind is executable
if ! [ -x "$(command -v valgrind)" ]; then
echo 'Error: valgrind is not installed and is not executable' >&2
exit 1
fi
valgrind --error-exitcode=10 --leak-check=yes php $extension_dir -d max_execution_time=300 \
if [ -x "$(command -v valgrind)" ]; then
valgrind --error-exitcode=10 --leak-check=yes php $extension_dir -d max_execution_time=300 \
../tests/MemoryLeakTest/MemoryLeakTest.php
exit 0
fi

@ -96,16 +96,6 @@ class CallTest extends PHPUnit_Framework_TestCase
$this->assertTrue($result->send_metadata);
}
public function testAddMultiAndMultiValueMetadata()
{
$batch = [
Grpc\OP_SEND_INITIAL_METADATA => ['key1' => ['value1', 'value2'],
'key2' => ['value3', 'value4'],],
];
$result = $this->call->startBatch($batch);
$this->assertTrue($result->send_metadata);
}
public function testGetPeer()
{
$this->assertTrue(is_string($this->call->getPeer()));

Loading…
Cancel
Save