This commit is contained in:
Hisham Mardam-Bey
2013-08-21 21:01:03 -04:00
2 changed files with 14 additions and 1 deletions

View File

@@ -240,7 +240,19 @@ public class PipeliningTest extends Assert {
assertEquals(new Long(-1), r3.get().get(0));
assertEquals(new Long(-3), r3.get().get(1));
}
@Test
public void testDiscardInPipeline() {
Pipeline pipeline = jedis.pipelined();
pipeline.multi();
pipeline.set("foo", "bar");
Response<String> discard = pipeline.discard();
Response<String> get = pipeline.get("foo");
pipeline.sync();
discard.get();
get.get();
}
@Test