Test script load and flush in pipeline

This commit is contained in:
Jennifer Hickey
2013-07-16 10:02:20 -07:00
parent bbd6822655
commit 9bad0adfa4
3 changed files with 6 additions and 6 deletions

View File

@@ -994,9 +994,9 @@ abstract public class AbstractConnectionPipelineIntegrationTests extends
@Test
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testScriptLoadEvalSha() {
// close the pipeline to get the return value of script load
getResults();
String sha1 = connection.scriptLoad("return KEYS[1]");
connection.scriptLoad("return KEYS[1]");
List<Object> results = convertResults();
String sha1 = (String)results.get(0);
initConnection();
actual.add(connection.evalSha(sha1, ReturnType.VALUE, 2, "key1", "key2"));
verifyResults(Arrays.asList(new Object[] {"key1"}), actual);
@@ -1058,8 +1058,8 @@ abstract public class AbstractConnectionPipelineIntegrationTests extends
public void testScriptFlush() {
getResults();
String sha1 = connection.scriptLoad("return KEYS[1]");
connection.scriptFlush();
initConnection();
connection.scriptFlush();
actual.add(connection.scriptExists(sha1));
verifyResults(Arrays.asList(new Object[] {Arrays.asList(new Object[] { 0l })}), actual);
}

View File

@@ -512,7 +512,7 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testScriptFlush() {
super.testScriptFlush();
connection.scriptFlush();
}
@Test(expected=UnsupportedOperationException.class)

View File

@@ -415,8 +415,8 @@ public class LettuceConnectionPipelineIntegrationTests extends
public void testScriptFlush() {
getResults();
String sha1 = connection.scriptLoad("return KEYS[1]");
connection.scriptFlush();
initConnection();
connection.scriptFlush();
actual.add(connection.scriptExists(sha1));
// Lettuce actually returns booleans, it's not an SDR conversion
verifyResults(Arrays.asList(new Object[] {Arrays.asList(new Object[] { false })}), actual);