mirror of
https://github.com/predis/predis.git
synced 2026-10-05 11:28:50 +00:00
Improved connection handshake session (#1431)
* Added pipelining for on-connection commands * Added server version condition for tests * Fixed static analysis and codestyle errors * Improved handshake session * Updated HELLO retry logic * Changed incorrect variable * Added return statement * Added more test coverage, codestyle fixes
This commit is contained in:
committed by
GitHub
parent
4b28ab1c74
commit
8b464f2a60
@@ -13,6 +13,7 @@
|
||||
namespace Predis\Connection;
|
||||
|
||||
use Predis\Command\RawCommand;
|
||||
use Predis\NotSupportedException;
|
||||
use Predis\Response\Error as ErrorResponse;
|
||||
use PredisTestCase;
|
||||
use Relay\Relay;
|
||||
@@ -61,6 +62,28 @@ class RelayConnectionTest extends PredisTestCase
|
||||
$this->assertTrue($this->connection->isConnected());
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testReadThrowsException(): void
|
||||
{
|
||||
$this->expectException(NotSupportedException::class);
|
||||
$this->expectExceptionMessage('The "relay" extension does not support reading responses.');
|
||||
|
||||
$this->connection->read();
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testWriteThrowsException(): void
|
||||
{
|
||||
$this->expectException(NotSupportedException::class);
|
||||
$this->expectExceptionMessage('The "relay" extension does not support writing operations.');
|
||||
|
||||
$this->connection->write('foobar');
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
* @return void
|
||||
|
||||
Reference in New Issue
Block a user