assertEquals(Utils.newArrayList(12L), sequenceBatchSizes);
}
public void testInsertWithSequenceGenerator_NoSequenceName() throws EntityNotFoundException {
String kind = getKind(HasSequenceWithNoSequenceName.class);
KeyRange keyRange = ds.allocateIds(kind, 5);
HasSequenceWithNoSequenceName pojo = new HasSequenceWithNoSequenceName();
beginTxn();
em.persist(pojo);
commitTxn();
ds.get(KeyFactory.createKey(kind, pojo.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(keyRange.getEnd().getId(), pojo.getId() - 1);
assertTrue(keyRange.getEnd().getId() < pojo.getId());
keyRange = ds.allocateIds(kind, 1);
// assertEquals(pojo.getId() + 12, keyRange.getStart().getId());
assertTrue(pojo.getId() + 12 <= keyRange.getStart().getId());
assertEquals(Utils.newArrayList(kind + "_SEQUENCE__JPA"), sequenceNames);
assertEquals(Utils.newArrayList(12L), sequenceBatchSizes);
}