mirror of
https://github.com/predis/predis.git
synced 2026-09-24 17:20:36 +00:00
Added vector sets commands to ClusterStrategy (#1710)
This commit is contained in:
@@ -331,6 +331,25 @@ class PredisStrategyTest extends PredisTestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
public function testKeysForVectorSetCommands(): void
|
||||
{
|
||||
$strategy = $this->getClusterStrategy();
|
||||
$commands = $this->getCommandFactory();
|
||||
|
||||
$arguments = [
|
||||
'VADD' => ['key', [1.0, 2.0], 'element'],
|
||||
'VSIM' => ['key', [1.0, 2.0]],
|
||||
];
|
||||
|
||||
foreach ($this->getExpectedCommands('keys-vector') as $commandID) {
|
||||
$command = $commands->create($commandID, $arguments[$commandID]);
|
||||
$this->assertSame($strategy->getSlotByKey('key'), $strategy->getSlot($command), $commandID);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @group disconnected
|
||||
*/
|
||||
@@ -667,6 +686,20 @@ class PredisStrategyTest extends PredisTestCase
|
||||
'XSETID' => 'keys-first',
|
||||
'XTRIM' => 'keys-first',
|
||||
|
||||
/* commands operating on vector sets */
|
||||
'VADD' => 'keys-vector',
|
||||
'VCARD' => 'keys-first',
|
||||
'VDIM' => 'keys-first',
|
||||
'VEMB' => 'keys-first',
|
||||
'VGETATTR' => 'keys-first',
|
||||
'VINFO' => 'keys-first',
|
||||
'VLINKS' => 'keys-first',
|
||||
'VRANDMEMBER' => 'keys-first',
|
||||
'VRANGE' => 'keys-first',
|
||||
'VREM' => 'keys-first',
|
||||
'VSETATTR' => 'keys-first',
|
||||
'VSIM' => 'keys-vector',
|
||||
|
||||
/* commands operating on time series */
|
||||
'TS.READ' => 'keys-first',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user