[HHH-4520] (Infinispan second level cache integration can cache stale collection data) testManyUsers now enabled after ISPN-277 was fixed.
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18184 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
6512e3e708
commit
16528acc0b
|
@ -61,7 +61,7 @@ import org.infinispan.util.logging.LogFactory;
|
|||
*/
|
||||
public class ConcurrentWriteTest extends SingleNodeTestCase {
|
||||
private static final Log log = LogFactory.getLog(ConcurrentWriteTest.class);
|
||||
|
||||
private static final boolean trace = log.isTraceEnabled();
|
||||
/**
|
||||
* when USER_COUNT==1, tests pass, when >4 tests fail
|
||||
*/
|
||||
|
@ -423,15 +423,21 @@ public class ConcurrentWriteTest extends SingleNodeTestCase {
|
|||
for (int i = 0; i < ITERATION_COUNT && !TERMINATE_ALL_USERS; i++) {
|
||||
if (contactExists())
|
||||
throw new IllegalStateException("contact already exists before add, customerId=" + customerId);
|
||||
if (trace) log.trace("Add contact for customer " + customerId);
|
||||
addContact(customerId);
|
||||
if (trace) log.trace("Added contact");
|
||||
thinkRandomTime();
|
||||
if (!contactExists())
|
||||
throw new IllegalStateException("contact missing after successful add, customerId=" + customerId);
|
||||
thinkRandomTime();
|
||||
if (trace) log.trace("Read all customers' first contact");
|
||||
// read everyone's contacts
|
||||
readEveryonesFirstContact();
|
||||
if (trace) log.trace("Read completed");
|
||||
thinkRandomTime();
|
||||
if (trace) log.trace("Remove contact of customer" + customerId);
|
||||
removeContact(customerId);
|
||||
if (trace) log.trace("Removed contact");
|
||||
if (contactExists())
|
||||
throw new IllegalStateException("contact still exists after successful remove call, customerId=" + customerId);
|
||||
thinkRandomTime();
|
||||
|
|
|
@ -34,6 +34,9 @@ public abstract class SingleNodeTestCase extends FunctionalTestCase {
|
|||
|
||||
protected TransactionManager getTransactionManager() {
|
||||
try {
|
||||
if (getTransactionManagerLookupClass() == null)
|
||||
return null;
|
||||
else
|
||||
return getTransactionManagerLookupClass().newInstance().getTransactionManager(null);
|
||||
} catch (Exception e) {
|
||||
log.error("Error", e);
|
||||
|
@ -81,7 +84,9 @@ public abstract class SingleNodeTestCase extends FunctionalTestCase {
|
|||
cfg.setProperty(Environment.USE_QUERY_CACHE, String.valueOf(getUseQueryCache()));
|
||||
cfg.setProperty(Environment.CACHE_REGION_FACTORY, getCacheRegionFactory().getName());
|
||||
cfg.setProperty(Environment.CONNECTION_PROVIDER, getConnectionProviderClass().getName());
|
||||
if (getTransactionManagerLookupClass() != null) {
|
||||
cfg.setProperty(Environment.TRANSACTION_MANAGER_STRATEGY, getTransactionManagerLookupClass().getName());
|
||||
}
|
||||
cfg.setProperty(Environment.TRANSACTION_STRATEGY, getTransactionFactoryClass().getName());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue