Cannot use the 'retry' option for transactions without providing a function block.

This commit is contained in:
Daniele Alessandri
2011-01-01 11:28:55 +01:00
parent 858d7372ca
commit 6b82b412fb
2 changed files with 21 additions and 2 deletions
+10
View File
@@ -735,6 +735,16 @@ class PredisClientFeaturesTestSuite extends PHPUnit_Framework_TestCase {
$this->assertEquals($attempts, $client1->get('attempts'));
}
/**
* @expectedException InvalidArgumentException
*/
function testMultiExecBlock_RetryNotAvailableWithoutBlock() {
$options = array('watch' => 'foo', 'retry' => 1);
$tx = RC::getConnection()->multiExec($options);
$tx->multi();
$tx->get('foo')->exec();
}
function testMultiExecBlock_CheckAndSet_Discard() {
$client = RC::getConnection();
$client->flushdb();