소스 검색

Skip integration tests for HyperLogLog commands on Redis < 2.8.9.

Caught this by running the test suite on TravisCI which still runs an
older version of Redis 2.8. We should find a more decent way to handle
differences in profiles when commands get added between patch releases
of Redis, our custom skip method will do for now.
Daniele Alessandri 10 년 전
부모
커밋
87417f4d7e
3개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      tests/Predis/Command/HyperLogLogAddTest.php
  2. 4 0
      tests/Predis/Command/HyperLogLogCountTest.php
  3. 2 0
      tests/Predis/Command/HyperLogLogMergeTest.php

+ 2 - 0
tests/Predis/Command/HyperLogLogAddTest.php

@@ -80,6 +80,8 @@ class HyperLogLogAddTest extends PredisCommandTestCase
      */
     public function testThrowsExceptionOnWrongType()
     {
+        $this->markTestSkippedOnRedisVersionBelow('2.8.9', 'HyperLogLog requires Redis >= 2.8.9.', true);
+
         $redis = $this->getClient();
 
         $redis->lpush('metavars', 'foo', 'hoge');

+ 4 - 0
tests/Predis/Command/HyperLogLogCountTest.php

@@ -81,6 +81,8 @@ class HyperLogLogCountTest extends PredisCommandTestCase
      */
     public function testThrowsExceptionOnWrongType()
     {
+        $this->markTestSkippedOnRedisVersionBelow('2.8.9', 'HyperLogLog requires Redis >= 2.8.9.', true);
+
         $redis = $this->getClient();
 
         $redis->lpush('metavars', 'foo', 'hoge');
@@ -94,6 +96,8 @@ class HyperLogLogCountTest extends PredisCommandTestCase
      */
     public function testThrowsExceptionOnWrongTypeOfAtLeastOneKey()
     {
+        $this->markTestSkippedOnRedisVersionBelow('2.8.9', 'HyperLogLog requires Redis >= 2.8.9.', true);
+
         $redis = $this->getClient();
 
         $redis->pfadd('metavars:1', 'foo', 'hoge');

+ 2 - 0
tests/Predis/Command/HyperLogLogMergeTest.php

@@ -77,6 +77,8 @@ class HyperLogLogMergeTest extends PredisCommandTestCase
      */
     public function testThrowsExceptionOnWrongType()
     {
+        $this->markTestSkippedOnRedisVersionBelow('2.8.9', 'HyperLogLog requires Redis >= 2.8.9.', true);
+
         $redis = $this->getClient();
 
         $redis->pfadd('metavars:1', 'foo', 'hoge');