Skip to content
Snippets Groups Projects
Commit 02d2807b authored by Ken Payson's avatar Ken Payson
Browse files

Fixes 2 issues:

1. In the State change test, 123->0 will hit a c-core GPR_ASSERT if
debugging is enabled because 123 doesn't map to a state that can
be printed.
2. In the Server test, 8888 is sometimes unavailable, so we just use
a wildcard port.
parent d960c8b1
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,7 @@ class ChannelTest extends PHPUnit_Framework_TestCase
$this->channel = new Grpc\Channel('localhost:0',
['credentials' => Grpc\ChannelCredentials::createInsecure()]);
$time = new Grpc\Timeval(1000);
$state = $this->channel->watchConnectivityState(123, $time);
$state = $this->channel->watchConnectivityState(1, $time);
$this->assertTrue($state);
unset($time);
}
......
......@@ -67,9 +67,9 @@ class ServerTest extends PHPUnit_Framework_TestCase
public function testRequestCall()
{
$this->server = new Grpc\Server();
$port = $this->server->addHttp2Port('0.0.0.0:8888');
$port = $this->server->addHttp2Port('0.0.0.0:0');
$this->server->start();
$channel = new Grpc\Channel('localhost:8888',
$channel = new Grpc\Channel('localhost:' . $port,
['credentials' => Grpc\ChannelCredentials::createInsecure()]);
$deadline = Grpc\Timeval::infFuture();
......
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