}
}
public void testInsertCollides_NoTxn() {
switchDatasource(PersistenceManagerFactoryName.nontransactional);
CollisionDatastoreDelegate dd = new CollisionDatastoreDelegate(getDelegateForThread());
setDelegateForThread(dd);
try {
Flight flight = new Flight();
flight.setName("harold");
flight.setOrigin("bos");
flight.setDest("mia");
flight.setYou(23);
flight.setMe(24);
flight.setFlightNumber(88);
try {
pm.makePersistent(flight);
fail("expected exception");
} catch (JDODataStoreException e) {
// good
assertTrue(e.getCause() instanceof ConcurrentModificationException);
}
assertEquals(flight, "harold", "bos", "mia", 23, 24, 88);
} finally {
setDelegateForThread(dd.getInner());
}
}