OPENJPA-1692: Comment out failing case in TestClearableScheduler while this change is backed out.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@961510 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Richard G. Curtis 2010-07-07 21:21:39 +00:00
parent 90a54ac7e7
commit 961e957be0
1 changed files with 27 additions and 25 deletions

View File

@ -30,6 +30,7 @@ import org.apache.openjpa.datacache.ConcurrentDataCache;
import org.apache.openjpa.datacache.DataCacheManager;
import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
import org.apache.openjpa.persistence.datacache.common.apps.ScheduledEviction;
import org.apache.openjpa.persistence.test.AllowFailure;
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
public class TestClearableScheduler extends SingleEMFTestCase {
@ -91,31 +92,32 @@ public class TestClearableScheduler extends SingleEMFTestCase {
assertEquals(2,cache2.getClearCount());
}
public void testMultithreadedInitialization() throws Exception {
final OpenJPAConfiguration conf = emf.getConfiguration();
final List<DataCacheManager> dcms = new Vector<DataCacheManager>();
Runnable r = new Runnable(){
public void run() {
dcms.add(conf.getDataCacheManagerInstance());
}
};
List<Thread> workers = new ArrayList<Thread>();
for(int i = 0;i<20;i++){
workers.add(new Thread(r));
}
for(Thread t : workers){
t.start();
}
for(Thread t : workers){
t.join();
}
DataCacheManager prev = dcms.get(0);
for(DataCacheManager dcm : dcms){
assertTrue(prev == dcm);
prev = dcm;
}
}
// Comment this test out while investigating OPENJPA-1692
// public void testMultithreadedInitialization() throws Exception {
// final OpenJPAConfiguration conf = emf.getConfiguration();
// final List<DataCacheManager> dcms = new Vector<DataCacheManager>();
// Runnable r = new Runnable(){
// public void run() {
// dcms.add(conf.getDataCacheManagerInstance());
// }
// };
// List<Thread> workers = new ArrayList<Thread>();
// for(int i = 0;i<20;i++){
// workers.add(new Thread(r));
// }
// for(Thread t : workers){
// t.start();
// }
// for(Thread t : workers){
// t.join();
// }
// DataCacheManager prev = dcms.get(0);
// for(DataCacheManager dcm : dcms){
// assertTrue(prev == dcm);
// prev = dcm;
// }
//
// }
/**
* Pass in 4 out of 5 tokens.