123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace Predis\Connection;
- class PhpiredisStreamConnectionTest extends PredisConnectionTestCase
- {
- const CONNECTION_CLASS = 'Predis\Connection\PhpiredisStreamConnection';
-
- public function testThrowsExceptionOnReadWriteTimeout()
- {
- $profile = $this->getCurrentProfile();
- $connection = $this->createConnectionWithParams(array(
- 'read_write_timeout' => 0.5,
- ), true);
- $connection->executeCommand($profile->createCommand('brpop', array('foo', 3)));
- }
-
- public function testThrowsExceptionOnProtocolDesynchronizationErrors()
- {
- $connection = $this->createConnection();
- $stream = $connection->getResource();
- $connection->writeRequest($this->getCurrentProfile()->createCommand('ping'));
- stream_socket_recvfrom($stream, 1);
- $connection->read();
- }
- }
|