Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for Redis extension and associated test suite
Summary: * Fix a couple of tests that were broken by 91b1918 adding two lines to the wrong expect file (list.php.expect instead of info.php.expect). * Fixed hphp/test/slow/ext_redis/watch.php.expect to expect the correct behavior. (Tested by verifying with Zend + phpredis.) * Make the key prefix set by the test suite include the md5 of the file path plus UNIX timestamp representing the test suite initialization. This makes the tests not break when the path exceeds the redis key length limit and it makes repeated test runs not conflict with one another. * Make Redis::sRandMember apply the key prefix (if one exists). * Make Redis::get() and Redis::h{m}get() return false rather than null for missing keys or fields, matching the behavior of phpredis. Minimal test case for the false / null behavior: <?php $redis = new Redis; $redis->connect("localhost"); var_dump($redis->get("nonexistent-key")); $redis->hMset('ice_cream', array('flavor' => 'vanilla')); var_dump($redi Closes #3318 Reviewed By: bsimmers, ptarjan Differential Revision: D1467674 Pulled By: svcscm
- Loading branch information
1 parent
31de467
commit 47b3503
Showing
10 changed files
with
22 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ array(2) { | |
} | ||
string(3) "bar" | ||
string(4) "boom" | ||
NULL | ||
bool(false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ bool(true) | |
bool(true) | ||
bool(true) | ||
string(17) "hhvm-redis-client" | ||
bool(true) | ||
bool(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,3 @@ int(2) | |
string(11) "easy as 123" | ||
string(5) "apple" | ||
string(11) "easy as 123" | ||
bool(true) | ||
bool(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ string(3) "bar" | |
array(0) { | ||
} | ||
array(1) { | ||
[0] => | ||
[0]=> | ||
string(3) "bar" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,5 @@ bool(true) | |
string(4) "6379" | ||
array(1) { | ||
[0]=> | ||
int(0) | ||
int(1) | ||
} |