mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-04 04:37:46 +08:00
Remove duplicate unset.
This commit is contained in:
parent
000c9462a9
commit
5bd376baf2
@ -331,8 +331,6 @@ class GrpcClient
|
||||
}
|
||||
// Force close.
|
||||
if ($this->waitStatus === Status::WAIT_CLOSE_FORCE) {
|
||||
$this->channelPool->release($this->recvChannelMap[$streamId]);
|
||||
unset($this->recvChannelMap[$streamId]);
|
||||
if ($this->closeRecv()) {
|
||||
break;
|
||||
}
|
||||
|
@ -50,6 +50,14 @@ class BaseClientTest extends TestCase
|
||||
self::$server->start();
|
||||
});
|
||||
}
|
||||
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
Coroutine::create(function () {
|
||||
self::$server->shutdown();
|
||||
});
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
if (swoole_version() === '4.4.14') {
|
||||
@ -65,13 +73,6 @@ class BaseClientTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
Coroutine::create(function () {
|
||||
self::$server->shutdown();
|
||||
});
|
||||
}
|
||||
|
||||
public function testGrpcClientConnectionFailure()
|
||||
{
|
||||
$this->getContainer();
|
||||
@ -135,9 +136,9 @@ class BaseClientTest extends TestCase
|
||||
{
|
||||
$this->getContainer();
|
||||
$client = new HiClient('127.0.0.1:2222', ['retry_attempts' => 0]);
|
||||
try{
|
||||
try {
|
||||
$client->sayBug();
|
||||
} catch(TypeError $e){
|
||||
} catch (TypeError $e) {
|
||||
$this->assertNotNull($e);
|
||||
} finally {
|
||||
$this->assertGreaterThan(0, $client->sayHello());
|
||||
|
@ -26,6 +26,7 @@ class HiClient extends BaseClient
|
||||
[UserReply::class, 'decode']
|
||||
);
|
||||
}
|
||||
|
||||
public function sayBug()
|
||||
{
|
||||
return $this->simpleRequest(
|
||||
|
Loading…
Reference in New Issue
Block a user