mirror of https://github.com/apache/openjpa.git
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:
parent
90a54ac7e7
commit
961e957be0
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue