Beispiel #1
0
 @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();
 }
Beispiel #2
0
 @Test(expected = JedisDataException.class)
 public void pipelineDiscardShoudThrowJedisDataExceptionWhenNotInMulti() {
   Pipeline pipeline = jedis.pipelined();
   pipeline.discard();
 }