summaryrefslogtreecommitdiffstats
path: root/2e412373c47a574a1215756e79e6512a46e30cdc.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-10-21 08:36:51 +0200
committerRemi Collet <remi@remirepo.net>2018-10-21 08:36:51 +0200
commitad2e3051b2f6126a744754dea3c8b63bf442b9e3 (patch)
tree86f9ae560ed58ace5c34a48a15d57b51c7783d65 /2e412373c47a574a1215756e79e6512a46e30cdc.patch
parent5ca504892cb610ceaec642f008020f4f1170a6fc (diff)
test build with upstream patches
Diffstat (limited to '2e412373c47a574a1215756e79e6512a46e30cdc.patch')
-rw-r--r--2e412373c47a574a1215756e79e6512a46e30cdc.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/2e412373c47a574a1215756e79e6512a46e30cdc.patch b/2e412373c47a574a1215756e79e6512a46e30cdc.patch
new file mode 100644
index 0000000..9140561
--- /dev/null
+++ b/2e412373c47a574a1215756e79e6512a46e30cdc.patch
@@ -0,0 +1,61 @@
+From 2e412373c47a574a1215756e79e6512a46e30cdc Mon Sep 17 00:00:00 2001
+From: michael-grunder <michael.grunder@gmail.com>
+Date: Fri, 12 Oct 2018 08:36:48 -0700
+Subject: [PATCH] Use a ZSET insted of SET for EVAL tests
+
+Redis SET type is unordered which could break our eval tests
+so use a ZSET instead where the order is deterministic.
+---
+ tests/RedisTest.php | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/tests/RedisTest.php b/tests/RedisTest.php
+index 28faafa8..e353829d 100644
+--- a/tests/RedisTest.php
++++ b/tests/RedisTest.php
+@@ -4508,10 +4508,10 @@ public function testEval() {
+ $this->redis->rpush('{eval-key}-list', 'c');
+
+ // Make a set
+- $this->redis->del('{eval-key}-set');
+- $this->redis->sadd('{eval-key}-set', 'd');
+- $this->redis->sadd('{eval-key}-set', 'e');
+- $this->redis->sadd('{eval-key}-set', 'f');
++ $this->redis->del('{eval-key}-zset');
++ $this->redis->zadd('{eval-key}-zset', 0, 'd');
++ $this->redis->zadd('{eval-key}-zset', 1, 'e');
++ $this->redis->zadd('{eval-key}-zset', 2, 'f');
+
+ // Basic keys
+ $this->redis->set('{eval-key}-str1', 'hello, world');
+@@ -4521,9 +4521,9 @@ public function testEval() {
+ $list = $this->redis->eval("return redis.call('lrange', KEYS[1], 0, -1)", Array('{eval-key}-list'), 1);
+ $this->assertTrue($list === Array('a','b','c'));
+
+- // Use a script to return our set
+- $set = $this->redis->eval("return redis.call('smembers', KEYS[1])", Array('{eval-key}-set'), 1);
+- $this->assertTrue($set == Array('d','e','f'));
++ // Use a script to return our zset
++ $zset = $this->redis->eval("return redis.call('zrange', KEYS[1], 0, -1)", Array('{eval-key}-zset'), 1);
++ $this->assertTrue($zset == Array('d','e','f'));
+
+ // Test an empty MULTI BULK response
+ $this->redis->del('{eval-key}-nolist');
+@@ -4539,7 +4539,7 @@ public function testEval() {
+ redis.call('get', '{eval-key}-str2'),
+ redis.call('lrange', 'not-any-kind-of-list', 0, -1),
+ {
+- redis.call('smembers','{eval-key}-set'),
++ redis.call('zrange','{eval-key}-zset', 0, -1),
+ redis.call('lrange', '{eval-key}-list', 0, -1)
+ }
+ }
+@@ -4559,7 +4559,7 @@ public function testEval() {
+ );
+
+ // Now run our script, and check our values against each other
+- $eval_result = $this->redis->eval($nested_script, Array('{eval-key}-str1', '{eval-key}-str2', '{eval-key}-set', '{eval-key}-list'), 4);
++ $eval_result = $this->redis->eval($nested_script, Array('{eval-key}-str1', '{eval-key}-str2', '{eval-key}-zset', '{eval-key}-list'), 4);
+ $this->assertTrue(is_array($eval_result) && count($this->array_diff_recursive($eval_result, $expected)) == 0);
+
+ /*