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