assertEquals(Utils.newArrayList(1L, 1L), sequenceBatchSizes);
}
public void testSequenceOnNonPkFields() {
String kind = getKind(HasSequenceOnNonPkFields.class);
HasSequenceOnNonPkFields pojo = new HasSequenceOnNonPkFields();
pojo.setId("jpa");
beginTxn();
em.persist(pojo);
commitTxn();
// 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(pojo.getVal(), pojo.getVal2() - 1);
assertTrue(pojo.getVal() < pojo.getVal2());
HasSequenceOnNonPkFields pojo2 = new HasSequenceOnNonPkFields();
pojo2.setId("jpa");
beginTxn();
em.persist(pojo2);
commitTxn();
// assertEquals(pojo.getVal2(), pojo2.getVal() - 1);
assertTrue(pojo.getVal2() < pojo2.getVal());
assertEquals(Utils.newArrayList(kind + "_SEQUENCE__JPA", kind + "_SEQUENCE__JPA",
kind + "_SEQUENCE__JPA", kind + "_SEQUENCE__JPA"), sequenceNames);
assertEquals(Utils.newArrayList(1L, 1L, 1L, 1L), sequenceBatchSizes);
}