assertEquals(Utils.newArrayList(12L), sequenceBatchSizes);
}
public void testSequenceWithUnencodedStringPk() throws EntityNotFoundException {
String kind = getKind(HasSequenceWithUnencodedStringPk.class);
HasSequenceWithUnencodedStringPk pojo = new HasSequenceWithUnencodedStringPk();
beginTxn();
em.persist(pojo);
commitTxn();
ds.get(KeyFactory.createKey(kind, pojo.getId()));
HasSequenceWithUnencodedStringPk pojo2 = new HasSequenceWithUnencodedStringPk();
beginTxn();
em.persist(pojo2);
commitTxn();
ds.get(KeyFactory.createKey(kind, pojo2.getId()));
// the local datastore id allocator is a single sequence so if there
// are any other allocations happening we can't assert on exact values.
// uncomment this check and the others below when we bring the local
// allocator in line with the prod allocator
// assertEquals(Long.parseLong(pojo.getId()), Long.parseLong(pojo2.getId()) - 1);
assertTrue(Long.parseLong(pojo.getId()) < Long.parseLong(pojo2.getId()));
assertEquals(Utils.newArrayList(kind + "_SEQUENCE__JPA", kind + "_SEQUENCE__JPA"), sequenceNames);
assertEquals(Utils.newArrayList(1L, 1L), sequenceBatchSizes);
}