Package org.springframework.data.keyvalue.redis.core

Examples of org.springframework.data.keyvalue.redis.core.StringRedisTemplate.convertAndSend()


  }

  @Test
  public void testWithMessages() throws Exception {
    StringRedisTemplate template = ctx.getBean(StringRedisTemplate.class);
    template.convertAndSend("x1", "[X]test");
    template.convertAndSend("z1", "[Z]test");
    //Thread.sleep(TimeUnit.SECONDS.toMillis(5));
  }

  @Test
View Full Code Here


  @Test
  public void testWithMessages() throws Exception {
    StringRedisTemplate template = ctx.getBean(StringRedisTemplate.class);
    template.convertAndSend("x1", "[X]test");
    template.convertAndSend("z1", "[Z]test");
    //Thread.sleep(TimeUnit.SECONDS.toMillis(5));
  }

  @Test
  public void testErrorHandler() throws Exception {
View Full Code Here

  public void testErrorHandler() throws Exception {
    StubErrorHandler handler = ctx.getBean(StubErrorHandler.class);
   
    int index = handler.throwables.size();
    StringRedisTemplate template = ctx.getBean(StringRedisTemplate.class);
    template.convertAndSend("exception", "test1");
    handler.throwables.pollLast(3, TimeUnit.SECONDS);
    assertEquals(index + 1, handler.throwables.size());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.