mirror of
https://github.com/predis/predis.git
synced 2026-09-24 17:20:36 +00:00
Added support for LMOVEM and BLMOVEM commands (#1709)
* Added support for LMOVEM and BLMOVEM commands * Removed background testing * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
eafa3ff2bf
commit
422990b631
@@ -205,6 +205,36 @@ class RedisStrategyTest extends PredisTestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testKeysForFirstTwoKeysCommands(): void
|
||||
{
|
||||
$strategy = $this->getClusterStrategy();
|
||||
$commands = $this->getCommandFactory();
|
||||
$arguments = ['{key}:source', '{key}:destination', 'LEFT', 'RIGHT'];
|
||||
|
||||
foreach ($this->getExpectedCommands('keys-first-two') as $commandID) {
|
||||
$command = $commands->create($commandID, $arguments);
|
||||
$this->assertNotNull($strategy->getSlot($command), $commandID);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testReturnsNullOnFirstTwoKeysCommandsWithDifferentSlots(): void
|
||||
{
|
||||
$strategy = $this->getClusterStrategy();
|
||||
$commands = $this->getCommandFactory();
|
||||
$arguments = ['key:source', 'key:destination', 'LEFT', 'RIGHT'];
|
||||
|
||||
foreach ($this->getExpectedCommands('keys-first-two') as $commandID) {
|
||||
$command = $commands->create($commandID, $arguments);
|
||||
$this->assertNull($strategy->getSlot($command), $commandID);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
@@ -436,9 +466,11 @@ class RedisStrategyTest extends PredisTestCase
|
||||
'LINSERT' => 'keys-first',
|
||||
'LINDEX' => 'keys-first',
|
||||
'LLEN' => 'keys-first',
|
||||
'LMOVEM' => 'keys-first-two',
|
||||
'LPOP' => 'keys-first',
|
||||
'RPOP' => 'keys-first',
|
||||
'RPOPLPUSH' => 'keys-all',
|
||||
'BLMOVEM' => 'keys-first-two',
|
||||
'BLPOP' => 'keys-blockinglist',
|
||||
'BRPOP' => 'keys-blockinglist',
|
||||
'BRPOPLPUSH' => 'keys-blockinglist',
|
||||
|
||||
Reference in New Issue
Block a user