We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b021ea commit 4336df3Copy full SHA for 4336df3
tests/RedisClusterTest.php
@@ -73,6 +73,13 @@ public function testPing() {
73
}
74
75
public function testRandomKey() {
76
+ /* Ensure some keys are present to test */
77
+ for ($i = 0; $i < 1000; $i++) {
78
+ if (rand(1, 2) == 1) {
79
+ $this->redis->set("key:$i", "val:$i");
80
+ }
81
82
+
83
for ($i = 0; $i < 1000; $i++) {
84
$k = $this->redis->randomKey("key:$i");
85
$this->assertTrue($this->redis->exists($k));
0 commit comments