assertEquals(Utils.newArrayList(1L, 1L), sequenceBatchSizes);
}
public void testSequenceOnNonPkFields() throws EntityNotFoundException {
String kind = getKind(HasSequenceOnNonPkFields.class);
HasSequenceOnNonPkFields pojo = new HasSequenceOnNonPkFields();
pojo.setId("jdo");
beginTxn();
pm.makePersistent(pojo);
// 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
assertTrue(pojo.getVal1() < pojo.getVal2());
commitTxn();
HasSequenceOnNonPkFields pojo2 = new HasSequenceOnNonPkFields();
pojo2.setId("jdo");
beginTxn();
pm.makePersistent(pojo2);
// assertEquals(pojo.getVal2(), pojo2.getVal1() - 1);
assertTrue(pojo.getVal2() < pojo2.getVal1());
commitTxn();
assertEquals(Utils.newArrayList(kind + "_SEQUENCE__JDO", kind + "_SEQUENCE__JDO",
kind + "_SEQUENCE__JDO", kind + "_SEQUENCE__JDO"), sequenceNames);
assertEquals(Utils.newArrayList(1L, 1L, 1L, 1L), sequenceBatchSizes);
}