Ejemplo n.º 1
0
  @Test
  public void string_formats_compatible_no_prefix() throws IOException {
    ArrayList keys = new ArrayList();
    for (int i = 0; i < 1000; i++) {
      keys.add(TT.randomString(10 + new Random().nextInt(100), 0));
    }

    checkStringSerializers(keys);
  }
Ejemplo n.º 2
0
  @Test
  public void string_formats_compatible_equal_size() throws IOException {
    ArrayList keys = new ArrayList();
    for (int i = 0; i < 1000; i++) {
      keys.add("common prefix " + TT.randomString(10, 0));
    }

    checkStringSerializers(keys);
  }
Ejemplo n.º 3
0
  @Test
  public void empty_update_commit() {
    if (TT.scale() == 0) return;

    e = openEngine();
    long recid = e.put("", Serializer.STRING_NOSIZE);
    assertEquals("", e.get(recid, Serializer.STRING_NOSIZE));

    for (int i = 0; i < 10000; i++) {
      String s = TT.randomString(80000);
      e.update(recid, s, Serializer.STRING_NOSIZE);
      assertEquals(s, e.get(recid, Serializer.STRING_NOSIZE));
      e.commit();
      assertEquals(s, e.get(recid, Serializer.STRING_NOSIZE));
    }
    e.close();
  }