Пример #1
0
  @Test
  public void testKryo() {
    Config config = createConfig();
    config.setCodec(kryoCodec);
    redisson = Redisson.create(config);

    test();
  }
Пример #2
0
  @Test
  public void testSnappy() {
    Config config = createConfig();
    config.setCodec(snappyCodec);
    redisson = Redisson.create(config);

    test();
  }
Пример #3
0
  @Test
  public void testJson() {
    Config config = createConfig();
    config.setCodec(jsonCodec);
    redisson = Redisson.create(config);

    test();
  }
Пример #4
0
  @Test
  public void testMsgPack() {
    Config config = createConfig();
    config.setCodec(msgPackCodec);
    redisson = Redisson.create(config);

    test();
  }
Пример #5
0
  @Test
  public void testLZ4() {
    Config config = createConfig();
    config.setCodec(lz4Codec);
    redisson = Redisson.create(config);

    test();
  }
Пример #6
0
  @Test
  public void testCbor() {
    Config config = createConfig();
    config.setCodec(cborCodec);
    redisson = Redisson.create(config);

    test();
  }
Пример #7
0
 @Test(expected = WriteRedisConnectionException.class)
 public void testSer() {
   Config config = new Config();
   config.useSingleServer().setAddress("127.0.0.1:6379");
   config.setCodec(new SerializationCodec());
   RedissonClient r = Redisson.create(config);
   r.getMap("test").put("1", new Dummy());
 }
Пример #8
0
  @Test
  public void testListOfStrings() {
    Config config = createConfig();
    config.setCodec(new JsonJacksonCodec());
    redisson = Redisson.create(config);

    RMap<String, List<String>> map = redisson.getMap("list of strings", jsonListOfStringCodec);
    map.put("foo", new ArrayList<String>(Arrays.asList("bar")));

    RMap<String, List<String>> map2 = redisson.getMap("list of strings", jsonListOfStringCodec);

    assertThat(map2).isEqualTo(map);
  }