Added retry support (#1616)

* Initial work on retries

* Added retry class and test coverage

* Added support for standalone and cluster

* Make TimeoutException instance of CommunicationException

* Added pipeline, trasnaction, replication support

* Fixed broken test

* Marked test as relay-incompatible

* Marked test as relay-incompatible

* Fixed analysis errors, added missing tests

* Codestyle fixes

* Fixed test

* Update README.md

* Update README.md

* Update README.md

* Updated README.md

* Refactor retry on read and write

* Added check for timeout value

* Updated README.md

* Fixed README.md

* Codestyle changes

* Added missing coverage

* Added missing test coverage

* Removed comments

* Added retry support for Relay connection (#1620)

* Added integration test case with mocked retry

* Changed client initialisation in tests

* Marked test as relay-incompatible

---------

Co-authored-by: Pavlo Yatsukhnenko <yatsukhnenko@users.noreply.github.com>
This commit is contained in:
Vladyslav Vildanov
2025-12-23 10:40:46 +02:00
committed by GitHub
parent 0ae180c942
commit 980326d5d8
42 changed files with 2502 additions and 222 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ namespace Predis\Connection;
use PHPUnit\Framework\MockObject\MockObject;
use Predis\Command\CommandInterface;
use Predis\Command\RawCommand;
use Predis\TimeoutException;
use PredisTestCase;
/**
@@ -459,7 +460,7 @@ abstract class PredisConnectionTestCase extends PredisTestCase
*/
public function testThrowsExceptionOnReadWriteTimeout(): void
{
$this->expectException('Predis\Connection\ConnectionException');
$this->expectException(TimeoutException::class);
$commands = $this->getCommandFactory();