File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ public function testWait() { return $this->markTestSkipped(); }
3333 public function testSelect () { return $ this ->markTestSkipped (); }
3434 public function testReconnectSelect () { return $ this ->markTestSkipped (); }
3535 public function testMultipleConnect () { return $ this ->markTestSkipped (); }
36+ public function testDoublePipeNoOp () { return $ this ->markTestSkipped (); }
3637
3738 /* Load our seeds on construction */
3839 public function __construct () {
Original file line number Diff line number Diff line change @@ -2554,6 +2554,31 @@ public function testPipelineMultiExec()
25542554 $ this ->assertEquals (5 , count ($ ret )); // should be 5 atomic operations
25552555 }
25562556
2557+ /* Github issue #1211 (ignore redundant calls to pipeline or multi) */
2558+ public function testDoublePipeNoOp () {
2559+ /* Only the first pipeline should be honored */
2560+ for ($ i = 0 ; $ i < 6 ; $ i ++) {
2561+ $ this ->redis ->pipeline ();
2562+ }
2563+
2564+ /* Set and get in our pipeline */
2565+ $ this ->redis ->set ('pipecount ' ,'over9000 ' )->get ('pipecount ' );
2566+
2567+ $ data = $ this ->redis ->exec ();
2568+ $ this ->assertEquals (Array (true ,'over9000 ' ), $ data );
2569+
2570+ /* Only the first MULTI should be honored */
2571+ for ($ i = 0 ; $ i < 6 ; $ i ++) {
2572+ $ this ->redis ->multi ();
2573+ }
2574+
2575+ /* Set and get in our MULTI block */
2576+ $ this ->redis ->set ('multicount ' , 'over9000 ' )->get ('multicount ' );
2577+
2578+ $ data = $ this ->redis ->exec ();
2579+ $ this ->assertEquals (Array (true , 'over9000 ' ), $ data );
2580+ }
2581+
25572582 protected function sequence ($ mode ) {
25582583 $ ret = $ this ->redis ->multi ($ mode )
25592584 ->set ('x ' , 42 )
You can’t perform that action at this time.
0 commit comments