diff options
Diffstat (limited to 'src/php/tests/unit_tests/ChannelTest.php')
-rw-r--r-- | src/php/tests/unit_tests/ChannelTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/php/tests/unit_tests/ChannelTest.php b/src/php/tests/unit_tests/ChannelTest.php index 5baff1fbd9..63d4193a8b 100644 --- a/src/php/tests/unit_tests/ChannelTest.php +++ b/src/php/tests/unit_tests/ChannelTest.php @@ -28,6 +28,9 @@ class ChannelTest extends PHPUnit_Framework_TestCase if (!empty($this->channel)) { $this->channel->close(); } + $channel_clean_persistent = + new Grpc\Channel('localhost:50010', []); + $channel_clean_persistent->cleanPersistentList(); } public function testInsecureCredentials() @@ -380,6 +383,11 @@ class ChannelTest extends PHPUnit_Framework_TestCase // close channel1 $this->channel1->close(); + // channel2 is now in SHUTDOWN state + $state = $this->channel2->getConnectivityState(); + $this->assertEquals(GRPC\CHANNEL_FATAL_FAILURE, $state); + + // calling it again will result in an exception because the // channel is already closed $state = $this->channel2->getConnectivityState(); } |