use of org.eclipse.persistence.testing.framework.TestWarningException in project eclipselink by eclipse-ee4j.
the class RownumFilteringQueryTest method setup.
@Override
public void setup() {
DatabaseSession session = (DatabaseSession) getSession();
DatabasePlatform platform = getSession().getPlatform();
if (!platform.isOracle()) {
throw new TestWarningException("Oracle Pagination not supported on platform " + platform);
}
tracker = new QuerySQLTracker(session);
}
use of org.eclipse.persistence.testing.framework.TestWarningException in project eclipselink by eclipse-ee4j.
the class UnitOfWorkClientSessionTestModel method addRequiredSystems.
@Override
public void addRequiredSystems() {
// H2 has locking issue with multiple connections.
if (getSession().getPlatform().isH2()) {
throw new TestWarningException("H2 has locking issue with multiple connections");
}
addRequiredSystem(new OwnershipSystem());
addRequiredSystem(new IndirectListSystem());
addRequiredSystem(new EmployeeSystem());
addRequiredSystem(new InsuranceSystem());
addRequiredSystem(new MappingSystem());
addRequiredSystem(new UOWSystem());
addRequiredSystem(new InheritanceSystem());
}
use of org.eclipse.persistence.testing.framework.TestWarningException in project eclipselink by eclipse-ee4j.
the class LockOnCloneTest method setup.
@Override
public void setup() {
if (getSession().isDistributedSession()) {
throw new TestWarningException("Test unavailable on Remote UnitOfWork because of timing issues");
}
getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
getSession().getDescriptor(ConcurrentAddress.class).getEventManager().addListener(listener);
UnitOfWork uow = getSession().acquireUnitOfWork();
this.person = ConcurrentPerson.example1();
// get the UOW clone to ensure the PK will be set in the case of Isolate in UOW test model
this.person = (ConcurrentPerson) uow.registerObject(this.person);
uow.commit();
ConcurrentAddress.RUNNING_TEST = ConcurrentAddress.LOCK_ON_CLONE_TEST;
}
use of org.eclipse.persistence.testing.framework.TestWarningException in project eclipselink by eclipse-ee4j.
the class MergeCloneWithReferencesTransparentIndirectionTest method setup.
@Override
public void setup() {
if (getSession() instanceof org.eclipse.persistence.sessions.remote.RemoteSession) {
throw new TestWarningException("This test cannot be run through the remote.");
}
order = new Order();
order.addLine(new OrderLine());
order.addLine(new OrderLine());
UnitOfWork uow = getSession().acquireUnitOfWork();
uow.registerObject(order);
uow.commit();
}
use of org.eclipse.persistence.testing.framework.TestWarningException in project eclipselink by eclipse-ee4j.
the class RegisterNewObjectInIdentityMapNoSeqTest method setup.
@Override
public void setup() {
zeroFailed = false;
negativeFailed = false;
zeroOverridden = false;
negativeOverridden = false;
getAbstractSession().beginTransaction();
ClassDescriptor descriptor = getSession().getClassDescriptor(Weather.class);
idValidationOriginal = descriptor.getIdValidation();
descriptor.setIdValidation(idValidation);
if (keepSequencing) {
if (descriptor.getSequence() == null) {
// ReturningPolicyTestModel substitutes sequences for returning
throw new TestWarningException("Cannot run test with descriptor.getSequence() == null");
}
if (!shouldAlwaysOverrideExistingValue) {
if (descriptor.getSequence().shouldAcquireValueAfterInsert()) {
throw new TestProblemException("Cannot run test with keepSequencing==true and alwayOverrideExistingValueOriginal==false with Identity sequence: it should always override");
}
}
shouldAlwaysOverrideExistingValueOriginal = descriptor.getSequence().shouldAlwaysOverrideExistingValue();
descriptor.getSequence().setShouldAlwaysOverrideExistingValue(shouldAlwaysOverrideExistingValue);
} else {
sequenceNumberField = descriptor.getSequenceNumberField();
descriptor.setSequenceNumberField(null);
sequenceNumberName = descriptor.getSequenceNumberName();
descriptor.setSequenceNumberName(null);
}
}
Aggregations