diff options
author | 2015-02-03 17:44:50 -0800 | |
---|---|---|
committer | 2015-02-03 17:44:50 -0800 | |
commit | d96db79b92e089fc1a18a0d11d06fffdcf892033 (patch) | |
tree | 3d605de98a6dea897bb8eefdc996fe5380169272 /src/php/tests/unit_tests/CallTest.php | |
parent | 8c0596edcaf00680eea55455471cba84ccf8061e (diff) |
Switched to binding servers to port 0 in tests
Diffstat (limited to 'src/php/tests/unit_tests/CallTest.php')
-rwxr-xr-x | src/php/tests/unit_tests/CallTest.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/php/tests/unit_tests/CallTest.php b/src/php/tests/unit_tests/CallTest.php index 795831cb65..ebf2ba34dd 100755 --- a/src/php/tests/unit_tests/CallTest.php +++ b/src/php/tests/unit_tests/CallTest.php @@ -1,16 +1,17 @@ <?php class CallTest extends PHPUnit_Framework_TestCase{ static $server; + static $port; public static function setUpBeforeClass() { $cq = new Grpc\CompletionQueue(); self::$server = new Grpc\Server($cq, []); - self::$server->add_http2_port('localhost:9001'); + self::$port = self::$server->add_http2_port('0.0.0.0:0'); } public function setUp() { $this->cq = new Grpc\CompletionQueue(); - $this->channel = new Grpc\Channel('localhost:9001', []); + $this->channel = new Grpc\Channel('localhost:' . self::$port, []); $this->call = new Grpc\Call($this->channel, '/foo', Grpc\Timeval::inf_future()); |