harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r948377 [5/21] - in /harmony/enhanced/java/branches/mrh: classlib/make/ classlib/modules/accessibility/make/ classlib/modules/annotation/make/ classlib/modules/applet/make/ classlib/modules/archive/make/ classlib/modules/archive/src/test/ja...
Date Wed, 26 May 2010 09:31:15 GMT
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ReentrantReadWriteLockTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ReentrantReadWriteLockTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ReentrantReadWriteLockTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ReentrantReadWriteLockTest.java Wed May 26 09:31:07 2010
@@ -11,6 +11,7 @@ import java.util.concurrent.locks.*;
 import java.util.concurrent.*;
 import java.io.*;
 import java.util.*;
+import tests.support.Support_Excludes;
 
 public class ReentrantReadWriteLockTest extends JSR166TestCase {
     public static void main(String[] args) {
@@ -66,6 +67,10 @@ public class ReentrantReadWriteLockTest 
      * Constructor sets given fairness, and is in unlocked state
      */
     public void testConstructor() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	ReentrantReadWriteLock rl = new ReentrantReadWriteLock();
         assertFalse(rl.isFair());
         assertFalse(rl.isWriteLocked());
@@ -80,6 +85,10 @@ public class ReentrantReadWriteLockTest 
      * write-locking and read-locking an unlocked lock succeed
      */
     public void testLock() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	ReentrantReadWriteLock rl = new ReentrantReadWriteLock();
         rl.writeLock().lock();
         assertTrue(rl.isWriteLocked());
@@ -104,6 +113,10 @@ public class ReentrantReadWriteLockTest 
      * locking an unlocked fair lock succeeds
      */
     public void testFairLock() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	ReentrantReadWriteLock rl = new ReentrantReadWriteLock(true);
         rl.writeLock().lock();
         assertTrue(rl.isWriteLocked());
@@ -127,6 +140,10 @@ public class ReentrantReadWriteLockTest 
      * getWriteHoldCount returns number of recursive holds
      */
     public void testGetWriteHoldCount() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	for(int i = 1; i <= SIZE; i++) {
 	    lock.writeLock().lock();
@@ -143,6 +160,10 @@ public class ReentrantReadWriteLockTest 
      * write-unlocking an unlocked lock throws IllegalMonitorStateException
      */
     public void testUnlock_IllegalMonitorStateException() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	ReentrantReadWriteLock rl = new ReentrantReadWriteLock();
 	try {
 	    rl.writeLock().unlock();
@@ -155,6 +176,10 @@ public class ReentrantReadWriteLockTest 
      * write-lockInterruptibly is interruptible
      */
     public void testWriteLockInterruptibly_Interrupted() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	Thread t = new Thread(new Runnable() {
                 public void run() {
@@ -183,6 +208,10 @@ public class ReentrantReadWriteLockTest 
      * timed write-tryLock is interruptible
      */
     public void testWriteTryLock_Interrupted() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -206,6 +235,10 @@ public class ReentrantReadWriteLockTest 
      * read-lockInterruptibly is interruptible
      */
     public void testReadLockInterruptibly_Interrupted() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -231,6 +264,10 @@ public class ReentrantReadWriteLockTest 
      * timed read-tryLock is interruptible
      */
     public void testReadTryLock_Interrupted() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -255,6 +292,10 @@ public class ReentrantReadWriteLockTest 
      * write-tryLock fails if locked
      */
     public void testWriteTryLockWhenLocked() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -275,6 +316,10 @@ public class ReentrantReadWriteLockTest 
      * read-tryLock fails if locked
      */
     public void testReadTryLockWhenLocked() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -295,6 +340,10 @@ public class ReentrantReadWriteLockTest 
      * Multiple threads can hold a read lock when not write-locked
      */
     public void testMultipleReadLocks() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.readLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -316,6 +365,10 @@ public class ReentrantReadWriteLockTest 
      * A writelock succeeds after reading threads unlock
      */
     public void testWriteAfterMultipleReadLocks() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.readLock().lock();
 	Thread t1 = new Thread(new Runnable() {
@@ -350,6 +403,10 @@ public class ReentrantReadWriteLockTest 
      * Readlocks succeed after a writing thread unlocks
      */
     public void testReadAfterWriteLock() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t1 = new Thread(new Runnable() {
@@ -384,6 +441,10 @@ public class ReentrantReadWriteLockTest 
      * Read trylock succeeds if write locked by current thread
      */
     public void testReadHoldingWriteLock() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
         assertTrue(lock.readLock().tryLock());
@@ -396,6 +457,10 @@ public class ReentrantReadWriteLockTest 
      * other threads are waiting for readlock
      */
     public void testReadHoldingWriteLock2() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t1 = new Thread(new Runnable() {
@@ -435,6 +500,10 @@ public class ReentrantReadWriteLockTest 
      * other threads are waiting for writelock
      */
     public void testReadHoldingWriteLock3() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t1 = new Thread(new Runnable() {
@@ -475,6 +544,10 @@ public class ReentrantReadWriteLockTest 
      * other threads are waiting for writelock
      */
     public void testWriteHoldingWriteLock4() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t1 = new Thread(new Runnable() {
@@ -514,6 +587,10 @@ public class ReentrantReadWriteLockTest 
      * Fair Read trylock succeeds if write locked by current thread
      */
     public void testReadHoldingWriteLockFair() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
 	lock.writeLock().lock();
         assertTrue(lock.readLock().tryLock());
@@ -526,6 +603,10 @@ public class ReentrantReadWriteLockTest 
      * other threads are waiting for readlock
      */
     public void testReadHoldingWriteLockFair2() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
 	lock.writeLock().lock();
 	Thread t1 = new Thread(new Runnable() {
@@ -566,6 +647,10 @@ public class ReentrantReadWriteLockTest 
      * other threads are waiting for writelock
      */
     public void testReadHoldingWriteLockFair3() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
 	lock.writeLock().lock();
 	Thread t1 = new Thread(new Runnable() {
@@ -606,6 +691,10 @@ public class ReentrantReadWriteLockTest 
      * other threads are waiting for writelock
      */
     public void testWriteHoldingWriteLockFair4() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
 	lock.writeLock().lock();
 	Thread t1 = new Thread(new Runnable() {
@@ -648,6 +737,10 @@ public class ReentrantReadWriteLockTest 
      * Read tryLock succeeds if readlocked but not writelocked
      */
     public void testTryLockWhenReadLocked() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.readLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -671,6 +764,10 @@ public class ReentrantReadWriteLockTest 
      * write tryLock fails when readlocked
      */
     public void testWriteTryLockWhenReadLocked() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.readLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -692,6 +789,10 @@ public class ReentrantReadWriteLockTest 
      * Fair Read tryLock succeeds if readlocked but not writelocked
      */
     public void testTryLockWhenReadLockedFair() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
 	lock.readLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -715,6 +816,10 @@ public class ReentrantReadWriteLockTest 
      * Fair write tryLock fails when readlocked
      */
     public void testWriteTryLockWhenReadLockedFair() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
 	lock.readLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -737,6 +842,10 @@ public class ReentrantReadWriteLockTest 
      * write timed tryLock times out if locked
      */
     public void testWriteTryLock_Timeout() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -761,6 +870,10 @@ public class ReentrantReadWriteLockTest 
      * read timed tryLock times out if write-locked
      */
     public void testReadTryLock_Timeout() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	lock.writeLock().lock();
 	Thread t = new Thread(new Runnable() {
@@ -786,6 +899,10 @@ public class ReentrantReadWriteLockTest 
      * write lockInterruptibly succeeds if lock free else is interruptible
      */
     public void testWriteLockInterruptibly() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	try {
             lock.writeLock().lockInterruptibly();
@@ -818,6 +935,10 @@ public class ReentrantReadWriteLockTest 
      *  read lockInterruptibly succeeds if lock free else is interruptible
      */
     public void testReadLockInterruptibly() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
 	try {
             lock.writeLock().lockInterruptibly();
@@ -849,6 +970,10 @@ public class ReentrantReadWriteLockTest 
      * Calling await without holding lock throws IllegalMonitorStateException
      */
     public void testAwait_IllegalMonitor() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
         try {
@@ -866,6 +991,10 @@ public class ReentrantReadWriteLockTest 
      * Calling signal without holding lock throws IllegalMonitorStateException
      */
     public void testSignal_IllegalMonitor() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
         try {
@@ -883,6 +1012,10 @@ public class ReentrantReadWriteLockTest 
      * awaitNanos without a signal times out
      */
     public void testAwaitNanos_Timeout() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
         try {
@@ -901,6 +1034,10 @@ public class ReentrantReadWriteLockTest 
      *  timed await without a signal times out
      */
     public void testAwait_Timeout() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
         try {
@@ -916,6 +1053,10 @@ public class ReentrantReadWriteLockTest 
      * awaitUntil without a signal times out
      */
     public void testAwaitUntil_Timeout() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
         try {
@@ -932,6 +1073,10 @@ public class ReentrantReadWriteLockTest 
      * await returns when signalled
      */
     public void testAwait() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
 	Thread t = new Thread(new Runnable() { 
@@ -992,6 +1137,10 @@ public class ReentrantReadWriteLockTest 
      * awaitUninterruptibly doesn't abort on interrupt
      */
     public void testAwaitUninterruptibly() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         final Condition c = lock.writeLock().newCondition();
         UninterruptableThread thread = new UninterruptableThread(lock.writeLock(), c);
@@ -1024,6 +1173,10 @@ public class ReentrantReadWriteLockTest 
      * await is interruptible
      */
     public void testAwait_Interrupt() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
 	Thread t = new Thread(new Runnable() { 
@@ -1055,6 +1208,10 @@ public class ReentrantReadWriteLockTest 
      * awaitNanos is interruptible
      */
     public void testAwaitNanos_Interrupt() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
 	Thread t = new Thread(new Runnable() { 
@@ -1086,6 +1243,10 @@ public class ReentrantReadWriteLockTest 
      * awaitUntil is interruptible
      */
     public void testAwaitUntil_Interrupt() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
 	Thread t = new Thread(new Runnable() { 
@@ -1118,6 +1279,10 @@ public class ReentrantReadWriteLockTest 
      * signalAll wakes up all threads
      */
     public void testSignalAll() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
 	Thread t1 = new Thread(new Runnable() { 
@@ -1167,6 +1332,10 @@ public class ReentrantReadWriteLockTest 
      * A serialized lock deserializes as unlocked
      */
     public void testSerialization() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ReentrantReadWriteLock l = new ReentrantReadWriteLock();
         l.readLock().lock();
         l.readLock().unlock();
@@ -1192,6 +1361,10 @@ public class ReentrantReadWriteLockTest 
      * hasQueuedThreads reports whether there are waiting threads
      */
     public void testhasQueuedThreads() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         Thread t1 = new Thread(new InterruptedLockRunnable(lock));
         Thread t2 = new Thread(new InterruptibleLockRunnable(lock));
@@ -1221,6 +1394,10 @@ public class ReentrantReadWriteLockTest 
      * hasQueuedThread(null) throws NPE
      */
     public void testHasQueuedThreadNPE() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock sync = new ReentrantReadWriteLock();
         try {
             sync.hasQueuedThread(null);
@@ -1233,6 +1410,10 @@ public class ReentrantReadWriteLockTest 
      * hasQueuedThread reports whether a thread is queued.
      */
     public void testHasQueuedThread() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock sync = new ReentrantReadWriteLock();
         Thread t1 = new Thread(new InterruptedLockRunnable(sync));
         Thread t2 = new Thread(new InterruptibleLockRunnable(sync));
@@ -1268,6 +1449,10 @@ public class ReentrantReadWriteLockTest 
      * getQueueLength reports number of waiting threads
      */
     public void testGetQueueLength() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         Thread t1 = new Thread(new InterruptedLockRunnable(lock));
         Thread t2 = new Thread(new InterruptibleLockRunnable(lock));
@@ -1297,6 +1482,10 @@ public class ReentrantReadWriteLockTest 
      * getQueuedThreads includes waiting threads
      */
     public void testGetQueuedThreads() { 
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final PublicReentrantReadWriteLock lock = new PublicReentrantReadWriteLock();
         Thread t1 = new Thread(new InterruptedLockRunnable(lock));
         Thread t2 = new Thread(new InterruptibleLockRunnable(lock));
@@ -1329,6 +1518,10 @@ public class ReentrantReadWriteLockTest 
      * hasWaiters throws NPE if null
      */
     public void testHasWaitersNPE() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         try {
             lock.hasWaiters(null);
@@ -1343,6 +1536,10 @@ public class ReentrantReadWriteLockTest 
      * getWaitQueueLength throws NPE if null
      */
     public void testGetWaitQueueLengthNPE() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         try {
             lock.getWaitQueueLength(null);
@@ -1358,6 +1555,10 @@ public class ReentrantReadWriteLockTest 
      * getWaitingThreads throws NPE if null
      */
     public void testGetWaitingThreadsNPE() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final PublicReentrantReadWriteLock lock = new PublicReentrantReadWriteLock();
         try {
             lock.getWaitingThreads(null);
@@ -1372,6 +1573,10 @@ public class ReentrantReadWriteLockTest 
      * hasWaiters throws IAE if not owned
      */
     public void testHasWaitersIAE() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         final Condition c = (lock.writeLock().newCondition());
 	final ReentrantReadWriteLock lock2 = new ReentrantReadWriteLock();
@@ -1388,6 +1593,10 @@ public class ReentrantReadWriteLockTest 
      * hasWaiters throws IMSE if not locked
      */
     public void testHasWaitersIMSE() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         final Condition c = (lock.writeLock().newCondition());
         try {
@@ -1404,6 +1613,10 @@ public class ReentrantReadWriteLockTest 
      * getWaitQueueLength throws IAE if not owned
      */
     public void testGetWaitQueueLengthIAE() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         final Condition c = (lock.writeLock().newCondition());
 	final ReentrantReadWriteLock lock2 = new ReentrantReadWriteLock();
@@ -1420,6 +1633,10 @@ public class ReentrantReadWriteLockTest 
      * getWaitQueueLength throws IMSE if not locked
      */
     public void testGetWaitQueueLengthIMSE() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         final Condition c = (lock.writeLock().newCondition());
         try {
@@ -1436,6 +1653,10 @@ public class ReentrantReadWriteLockTest 
      * getWaitingThreads throws IAE if not owned
      */
     public void testGetWaitingThreadsIAE() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final PublicReentrantReadWriteLock lock = new PublicReentrantReadWriteLock();	
         final Condition c = (lock.writeLock().newCondition());
 	final PublicReentrantReadWriteLock lock2 = new PublicReentrantReadWriteLock();	
@@ -1452,6 +1673,10 @@ public class ReentrantReadWriteLockTest 
      * getWaitingThreads throws IMSE if not locked
      */
     public void testGetWaitingThreadsIMSE() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final PublicReentrantReadWriteLock lock = new PublicReentrantReadWriteLock();	
         final Condition c = (lock.writeLock().newCondition());
         try {
@@ -1468,6 +1693,10 @@ public class ReentrantReadWriteLockTest 
      * hasWaiters returns true when a thread is waiting, else false
      */
     public void testHasWaiters() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         final Condition c = (lock.writeLock().newCondition());
 	Thread t = new Thread(new Runnable() { 
@@ -1510,6 +1739,10 @@ public class ReentrantReadWriteLockTest 
      * getWaitQueueLength returns number of waiting threads
      */
     public void testGetWaitQueueLength() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         final Condition c = (lock.writeLock().newCondition());
 	Thread t = new Thread(new Runnable() { 
@@ -1553,6 +1786,10 @@ public class ReentrantReadWriteLockTest 
      * getWaitingThreads returns only and all waiting threads
      */
     public void testGetWaitingThreads() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	final PublicReentrantReadWriteLock lock = new PublicReentrantReadWriteLock();	
         final Condition c = lock.writeLock().newCondition();
 	Thread t1 = new Thread(new Runnable() { 
@@ -1616,6 +1853,10 @@ public class ReentrantReadWriteLockTest 
      * toString indicates current lock state
      */
     public void testToString() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         String us = lock.toString();
         assertTrue(us.indexOf("Write locks = 0") >= 0);
@@ -1636,6 +1877,10 @@ public class ReentrantReadWriteLockTest 
      * readLock.toString indicates current lock state
      */
     public void testReadLockToString() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         String us = lock.readLock().toString();
         assertTrue(us.indexOf("Read locks = 0") >= 0);
@@ -1649,6 +1894,10 @@ public class ReentrantReadWriteLockTest 
      * writeLock.toString indicates current lock state
      */
     public void testWriteLockToString() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         String us = lock.writeLock().toString();
         assertTrue(us.indexOf("Unlocked") >= 0);

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ScheduledExecutorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ScheduledExecutorTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ScheduledExecutorTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ScheduledExecutorTest.java Wed May 26 09:31:07 2010
@@ -10,6 +10,7 @@ import junit.framework.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
+import tests.support.Support_Excludes;
 
 public class ScheduledExecutorTest extends JSR166TestCase {
     public static void main(String[] args) {
@@ -24,6 +25,10 @@ public class ScheduledExecutorTest exten
      * execute successfully executes a runnable
      */
     public void testExecute() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	try {
             TrackedShortRunnable runnable =new TrackedShortRunnable();
             ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
@@ -51,6 +56,10 @@ public class ScheduledExecutorTest exten
      * delayed schedule of callable successfully executes after delay
      */
     public void testSchedule1() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	try {
             TrackedCallable callable = new TrackedCallable();
             ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
@@ -72,6 +81,10 @@ public class ScheduledExecutorTest exten
      *  delayed schedule of runnable successfully executes after delay
      */
     public void testSchedule3() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	try {
             TrackedShortRunnable runnable = new TrackedShortRunnable();
             ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
@@ -91,6 +104,10 @@ public class ScheduledExecutorTest exten
      * scheduleAtFixedRate executes runnable after given initial delay
      */
     public void testSchedule4() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	try {
             TrackedShortRunnable runnable = new TrackedShortRunnable();
             ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
@@ -114,6 +131,10 @@ public class ScheduledExecutorTest exten
      * scheduleWithFixedDelay executes runnable after given initial delay
      */
     public void testSchedule5() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	try {
             TrackedShortRunnable runnable = new TrackedShortRunnable();
             ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
@@ -132,6 +153,10 @@ public class ScheduledExecutorTest exten
      * scheduleAtFixedRate executes series of tasks at given rate
      */
     public void testFixedRateSequence() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	try {
             ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
             RunnableCounter counter = new RunnableCounter();
@@ -154,6 +179,10 @@ public class ScheduledExecutorTest exten
      * scheduleWithFixedDelay executes series of tasks with given period
      */
     public void testFixedDelaySequence() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	try {
             ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
             RunnableCounter counter = new RunnableCounter();
@@ -175,6 +204,10 @@ public class ScheduledExecutorTest exten
      *  execute (null) throws NPE
      */
     public void testExecuteNull() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor se = null;
         try {
 	    se = new ScheduledThreadPoolExecutor(1);
@@ -192,6 +225,10 @@ public class ScheduledExecutorTest exten
      * schedule (null) throws NPE
      */
     public void testScheduleNull() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1);
 	try {
             TrackedCallable callable = null;
@@ -208,6 +245,10 @@ public class ScheduledExecutorTest exten
      * execute throws RejectedExecutionException if shutdown
      */
     public void testSchedule1_RejectedExecutionException() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1);
         try {
             se.shutdown();
@@ -226,6 +267,10 @@ public class ScheduledExecutorTest exten
      * schedule throws RejectedExecutionException if shutdown
      */
     public void testSchedule2_RejectedExecutionException() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1);
         try {
             se.shutdown();
@@ -242,6 +287,10 @@ public class ScheduledExecutorTest exten
      * schedule callable throws RejectedExecutionException if shutdown
      */
      public void testSchedule3_RejectedExecutionException() {
+         if (Support_Excludes.isExcluded()) {
+             return;
+         }
+
          ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1);
          try {
             se.shutdown();
@@ -258,6 +307,10 @@ public class ScheduledExecutorTest exten
      *  scheduleAtFixedRate throws RejectedExecutionException if shutdown
      */
     public void testScheduleAtFixedRate1_RejectedExecutionException() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1);
         try {
             se.shutdown();
@@ -274,6 +327,10 @@ public class ScheduledExecutorTest exten
      * scheduleWithFixedDelay throws RejectedExecutionException if shutdown
      */
     public void testScheduleWithFixedDelay1_RejectedExecutionException() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1);
         try {
             se.shutdown();
@@ -291,6 +348,10 @@ public class ScheduledExecutorTest exten
      *  thread becomes active
      */
     public void testGetActiveCount() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor p2 = new ScheduledThreadPoolExecutor(2);
         assertEquals(0, p2.getActiveCount());
         p2.execute(new SmallRunnable());
@@ -308,6 +369,10 @@ public class ScheduledExecutorTest exten
      *   when tasks complete
      */
     public void testGetCompletedTaskCount() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor p2 = new ScheduledThreadPoolExecutor(2);
         assertEquals(0, p2.getCompletedTaskCount());
         p2.execute(new SmallRunnable());
@@ -324,6 +389,10 @@ public class ScheduledExecutorTest exten
      *  getCorePoolSize returns size given in constructor if not otherwise set 
      */
     public void testGetCorePoolSize() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         assertEquals(1, p1.getCorePoolSize());
         joinPool(p1);
@@ -334,6 +403,10 @@ public class ScheduledExecutorTest exten
      *   multiple threads active
      */
     public void testGetLargestPoolSize() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor p2 = new ScheduledThreadPoolExecutor(2);
         assertEquals(0, p2.getLargestPoolSize());
         p2.execute(new SmallRunnable());
@@ -352,6 +425,10 @@ public class ScheduledExecutorTest exten
      *   become active
      */
     public void testGetPoolSize() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         assertEquals(0, p1.getPoolSize());
         p1.execute(new SmallRunnable());
@@ -364,6 +441,10 @@ public class ScheduledExecutorTest exten
      *    submitted
      */
     public void testGetTaskCount() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         assertEquals(0, p1.getTaskCount());
         for(int i = 0; i < 5; i++)
@@ -381,6 +462,10 @@ public class ScheduledExecutorTest exten
      * getThreadFactory returns factory in constructor if not set
      */
     public void testGetThreadFactory() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ThreadFactory tf = new SimpleThreadFactory();
 	ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1, tf);
         assertSame(tf, p.getThreadFactory());
@@ -391,6 +476,10 @@ public class ScheduledExecutorTest exten
      * setThreadFactory sets the thread factory returned by getThreadFactory
      */
     public void testSetThreadFactory() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ThreadFactory tf = new SimpleThreadFactory();
 	ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1);
         p.setThreadFactory(tf);
@@ -402,6 +491,10 @@ public class ScheduledExecutorTest exten
      * setThreadFactory(null) throws NPE
      */
     public void testSetThreadFactoryNull() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1);
         try {
             p.setThreadFactory(null);
@@ -417,6 +510,10 @@ public class ScheduledExecutorTest exten
      */
     public void testIsShutdown() {
         
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         try {
             assertFalse(p1.isShutdown());
@@ -432,6 +529,10 @@ public class ScheduledExecutorTest exten
      *   isTerminated is false before termination, true after
      */
     public void testIsTerminated() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         try {
             p1.execute(new SmallRunnable());
@@ -450,6 +551,10 @@ public class ScheduledExecutorTest exten
      *  isTerminating is not true when running or when terminated
      */
     public void testIsTerminating() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         assertFalse(p1.isTerminating());
         try {
@@ -471,6 +576,10 @@ public class ScheduledExecutorTest exten
      * getQueue returns the work queue, which contains queued tasks
      */
     public void testGetQueue() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         ScheduledFuture[] tasks = new ScheduledFuture[5];
         for(int i = 0; i < 5; i++){
@@ -492,6 +601,10 @@ public class ScheduledExecutorTest exten
      * remove(task) removes queued task, and fails to remove active task
      */
     public void testRemove() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         ScheduledFuture[] tasks = new ScheduledFuture[5];
         for(int i = 0; i < 5; i++){
@@ -520,6 +633,10 @@ public class ScheduledExecutorTest exten
      *  purge removes cancelled tasks from the queue
      */
     public void testPurge() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         ScheduledFuture[] tasks = new ScheduledFuture[5];
         for(int i = 0; i < 5; i++){
@@ -551,6 +668,10 @@ public class ScheduledExecutorTest exten
      *  shutDownNow returns a list containing tasks that were not run
      */
     public void testShutDownNow() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
 	ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         for(int i = 0; i < 5; i++)
             p1.schedule(new SmallPossiblyInterruptedRunnable(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS);
@@ -570,6 +691,10 @@ public class ScheduledExecutorTest exten
      * tasks at shutdown
      */
     public void testShutDown1() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         try {
             ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
             assertTrue(p1.getExecuteExistingDelayedTasksAfterShutdownPolicy());
@@ -603,6 +728,10 @@ public class ScheduledExecutorTest exten
      * delayed tasks are cancelled at shutdown
      */
     public void testShutDown2() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         try {
             ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
             p1.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
@@ -627,6 +756,10 @@ public class ScheduledExecutorTest exten
      * periodic tasks are not cancelled at shutdown
      */
     public void testShutDown3() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         try {
             ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
             p1.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);
@@ -649,6 +782,10 @@ public class ScheduledExecutorTest exten
      * periodic tasks are cancelled at shutdown
      */
     public void testShutDown4() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1);
         try {
             p1.setContinueExistingPeriodicTasksAfterShutdownPolicy(true);
@@ -678,6 +815,10 @@ public class ScheduledExecutorTest exten
      * completed submit of callable returns result
      */
     public void testSubmitCallable() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             Future<String> future = e.submit(new StringTask());
@@ -698,6 +839,10 @@ public class ScheduledExecutorTest exten
      * completed submit of runnable returns successfully
      */
     public void testSubmitRunnable() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             Future<?> future = e.submit(new NoOpRunnable());
@@ -718,6 +863,10 @@ public class ScheduledExecutorTest exten
      * completed submit of (runnable, result) returns result
      */
     public void testSubmitRunnable2() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING);
@@ -738,6 +887,10 @@ public class ScheduledExecutorTest exten
      * invokeAny(null) throws NPE
      */
     public void testInvokeAny1() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             e.invokeAny(null);
@@ -753,6 +906,10 @@ public class ScheduledExecutorTest exten
      * invokeAny(empty collection) throws IAE
      */
     public void testInvokeAny2() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             e.invokeAny(new ArrayList<Callable<String>>());
@@ -768,6 +925,10 @@ public class ScheduledExecutorTest exten
      * invokeAny(c) throws NPE if c has null elements
      */
     public void testInvokeAny3() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -786,6 +947,10 @@ public class ScheduledExecutorTest exten
      * invokeAny(c) throws ExecutionException if no task completes
      */
     public void testInvokeAny4() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -803,6 +968,10 @@ public class ScheduledExecutorTest exten
      * invokeAny(c) returns result of some task
      */
     public void testInvokeAny5() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -822,6 +991,10 @@ public class ScheduledExecutorTest exten
      * invokeAll(null) throws NPE
      */
     public void testInvokeAll1() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             e.invokeAll(null);
@@ -837,6 +1010,10 @@ public class ScheduledExecutorTest exten
      * invokeAll(empty collection) returns empty collection
      */
     public void testInvokeAll2() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>());
@@ -852,6 +1029,10 @@ public class ScheduledExecutorTest exten
      * invokeAll(c) throws NPE if c has null elements
      */
     public void testInvokeAll3() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -870,6 +1051,10 @@ public class ScheduledExecutorTest exten
      * get of invokeAll(c) throws exception on failed task
      */
     public void testInvokeAll4() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -890,6 +1075,10 @@ public class ScheduledExecutorTest exten
      * invokeAll(c) returns results of all completed tasks
      */
     public void testInvokeAll5() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -911,6 +1100,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAny(null) throws NPE
      */
     public void testTimedInvokeAny1() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             e.invokeAny(null, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
@@ -926,6 +1119,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAny(,,null) throws NPE
      */
     public void testTimedInvokeAnyNullTimeUnit() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -943,6 +1140,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAny(empty collection) throws IAE
      */
     public void testTimedInvokeAny2() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             e.invokeAny(new ArrayList<Callable<String>>(), MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
@@ -958,6 +1159,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAny(c) throws NPE if c has null elements
      */
     public void testTimedInvokeAny3() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -977,6 +1182,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAny(c) throws ExecutionException if no task completes
      */
     public void testTimedInvokeAny4() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -994,6 +1203,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAny(c) returns result of some task
      */
     public void testTimedInvokeAny5() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -1013,6 +1226,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAll(null) throws NPE
      */
     public void testTimedInvokeAll1() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             e.invokeAll(null, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
@@ -1028,6 +1245,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAll(,,null) throws NPE
      */
     public void testTimedInvokeAllNullTimeUnit() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -1045,6 +1266,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAll(empty collection) returns empty collection
      */
     public void testTimedInvokeAll2() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             List<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>(), MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
@@ -1060,6 +1285,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAll(c) throws NPE if c has null elements
      */
     public void testTimedInvokeAll3() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -1078,6 +1307,10 @@ public class ScheduledExecutorTest exten
      * get of element of invokeAll(c) throws exception on failed task
      */
     public void testTimedInvokeAll4() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -1098,6 +1331,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAll(c) returns results of all completed tasks
      */
     public void testTimedInvokeAll5() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
@@ -1119,6 +1356,10 @@ public class ScheduledExecutorTest exten
      * timed invokeAll(c) cancels tasks not completed by timeout
      */
     public void testTimedInvokeAll6() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ExecutorService e = new ScheduledThreadPoolExecutor(2);
         try {
             ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ThreadLocalTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ThreadLocalTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ThreadLocalTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/concurrent/src/test/java/ThreadLocalTest.java Wed May 26 09:31:07 2010
@@ -8,6 +8,7 @@
 
 import junit.framework.*;
 import java.util.concurrent.Semaphore;
+import tests.support.Support_Excludes;
 
 public class ThreadLocalTest extends JSR166TestCase {
     public static void main(String[] args) {
@@ -39,6 +40,10 @@ public class ThreadLocalTest extends JSR
      * remove causes next access to return initial value
      */
     public void testRemove() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         assertEquals(tl.get(), one);
         tl.set(two);
         assertEquals(tl.get(), two);
@@ -51,6 +56,10 @@ public class ThreadLocalTest extends JSR
      * initial value
      */
     public void testRemoveITL() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         assertEquals(itl.get(), zero);
         itl.set(two);
         assertEquals(itl.get(), two);
@@ -89,6 +98,10 @@ public class ThreadLocalTest extends JSR
      * InheritableThreadLocal propagates generic values.
      */
     public void testGenericITL() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         final int threadCount = 10;
         final int x[] = new int[threadCount];
         Thread progenitor = new ITLThread(x);

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/crypto/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/crypto/make/run-test.xml?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/crypto/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/crypto/make/run-test.xml Wed May 26 09:31:07 2010
@@ -33,7 +33,7 @@
 
     <target name="test-module"
             depends="-test-module,-test-module-impl" />
-    <target name="-test-module" depends="test-jre-vm-info">
+    <target name="-test-module">
         <convert-test-as-class from="test.case" to="converted.tc.class" />
         <run-hdk-tests module="crypto" jar="crypto_api_tests.jar">
             <junit-elements>

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/imageio/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/imageio/make/run-test.xml?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/imageio/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/imageio/make/run-test.xml Wed May 26 09:31:07 2010
@@ -31,7 +31,7 @@
 
     <target name="test" depends="test-module" />
 
-    <target name="test-module" depends="test-jre-vm-info">
+    <target name="test-module">
         <convert-test-as-class from="test.case" to="converted.tc.class" />
         <run-hdk-tests module="imageio" jar="imageio_tests.jar">
             <junit-elements>

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/ImageIOTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/ImageIOTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/ImageIOTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/imageio/src/test/java/javax/imageio/ImageIOTest.java Wed May 26 09:31:07 2010
@@ -22,10 +22,15 @@ import java.util.LinkedList;
 import java.util.List;
 
 import junit.framework.TestCase;
+import tests.support.Support_Excludes;
 
 public class ImageIOTest extends TestCase {
 
     public void testReadURL() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         // Regression for HARMONY-3135
         for (URL url : listImages()) {
             assertNotNull("Failed to load image from URL " + url,

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/instrument/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/instrument/make/run-test.xml?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/instrument/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/instrument/make/run-test.xml Wed May 26 09:31:07 2010
@@ -31,7 +31,7 @@
 
     <target name="test" depends="test-module" />
 
-    <target name="test-module" depends="test-jre-vm-info">
+    <target name="test-module">
         <convert-test-as-class from="test.case" to="converted.tc.class" />
         <run-hdk-tests module="instrument" jar="instrument_tests.jar" />
     </target>

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/InstrumentTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/InstrumentTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/InstrumentTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/instrument/src/test/java/org/apache/harmony/tests/java/lang/instrument/InstrumentTest.java Wed May 26 09:31:07 2010
@@ -20,6 +20,7 @@ package org.apache.harmony.tests.java.la
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 import tests.support.Support_Exec;
+import tests.support.Support_Excludes;
 
 public class InstrumentTest extends TestCase {
 
@@ -27,6 +28,10 @@ public class InstrumentTest extends Test
      * @tests try to add a null Transformer
      */
     public void test_addTransformer_null() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/Premain_addTransformer_null.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";
@@ -40,6 +45,10 @@ public class InstrumentTest extends Test
      * @tests try to remove a null Transformer
      */
     public void test_removeTransformer_null() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/Premain_removeTransformer_null.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";
@@ -53,6 +62,10 @@ public class InstrumentTest extends Test
      * @tests try to remove a non-exists Transformer
      */
     public void test_removeTransformer_notExists() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/Premain_removeTransformer_notExists.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";
@@ -66,6 +79,10 @@ public class InstrumentTest extends Test
      * @tests try to load a class that does not exist
      */
     public void test_loadClass_null() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/loading_class.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";
@@ -84,6 +101,10 @@ public class InstrumentTest extends Test
      * @tests try to use a new ClassLoader
      */
     public void test_new_classLoader_Exists() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/new_classloader.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";
@@ -97,6 +118,10 @@ public class InstrumentTest extends Test
      * @tests test if attribute of "Premain-Class" is null
      */
     public void test_Property_Premain_null() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/Property_Premain_null.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";
@@ -119,6 +144,10 @@ public class InstrumentTest extends Test
      *        is null
      */
     public void test_Property_other_null() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/Property_other_null.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";
@@ -132,6 +161,10 @@ public class InstrumentTest extends Test
      * @tests test if the attributes is case-sensitive
      */
     public void test_Properity_case_sensitive() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/Properity_case_sensitive.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";
@@ -145,6 +178,10 @@ public class InstrumentTest extends Test
      * @tests test if the jar file is bad
      */
     public void test_BadFormatJar() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/BadFormatJar.jar";
         arg[1] = "";
@@ -166,6 +203,10 @@ public class InstrumentTest extends Test
      * @tests test if premain class is null
      */
     public void test_Premain_Class_null() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/Premain_Class_null.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";
@@ -184,6 +225,10 @@ public class InstrumentTest extends Test
      * @tests test transforming all classes to a zero byte
      */
     public void test_zero_byte_transformer() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/zero_byte_class.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";
@@ -197,6 +242,10 @@ public class InstrumentTest extends Test
      * @tests test if complied by version 1.4
      */
     public void test_old_version() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String[] arg = new String[2];
         arg[0] = "-javaagent:src/test/resources/jars/org/apache/harmony/tests/instrument/old_version_class.jar";
         arg[1] = "org/apache/harmony/tests/java/lang/instrument/TestMain";

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/jndi/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/jndi/make/run-test.xml?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/jndi/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/jndi/make/run-test.xml Wed May 26 09:31:07 2010
@@ -31,7 +31,7 @@
 
     <target name="test" depends="test-module" />
 
-    <target name="test-module" depends="test-jre-vm-info">
+    <target name="test-module">
         <convert-test-as-class from="test.case" to="converted.tc.class" />
         <run-selected-hdk-tests module="jndi" jar="jndi_tests.jar">
             <excludeorinclude>

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/dns/TestMgr.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/dns/TestMgr.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/dns/TestMgr.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/dns/TestMgr.java Wed May 26 09:31:07 2010
@@ -24,6 +24,7 @@ package org.apache.harmony.jndi.provider
 
 
 import java.lang.reflect.Field;
+import tests.support.Support_Excludes;
 
 /**
  * Contains several utility methods. Is used from unit tests.

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/ldap/LdapContextFactoryTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/ldap/LdapContextFactoryTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/ldap/LdapContextFactoryTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/provider/ldap/LdapContextFactoryTest.java Wed May 26 09:31:07 2010
@@ -32,6 +32,7 @@ import javax.naming.Context;
 import javax.net.SocketFactory;
 
 import junit.framework.TestCase;
+import tests.support.Support_Excludes;
 
 public class LdapContextFactoryTest extends TestCase {
     private Hashtable<String, Object> env = new Hashtable<String, Object>();
@@ -43,6 +44,10 @@ public class LdapContextFactoryTest exte
     }
 
     public void test_getInitialContext() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         env.put(Context.PROVIDER_URL, "ldap://192.168.1.1:389");
 
         env.put("java.naming.ldap.factory.socket", MockSocketFactory.class

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/make/run-test.xml?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/make/run-test.xml (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/make/run-test.xml Wed May 26 09:31:07 2010
@@ -33,7 +33,7 @@
 
     <target name="test-module"
             depends="-test-module,-test-module-impl" />
-    <target name="-test-module" depends="test-jre-vm-info">
+    <target name="-test-module">
         <convert-test-as-class from="test.case" to="converted.tc.class" />
         <run-hdk-tests module="lang-management"
                        jar="lang-management_tests.jar" />

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/ClassLoadingMXBeanTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/ClassLoadingMXBeanTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/ClassLoadingMXBeanTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/ClassLoadingMXBeanTest.java Wed May 26 09:31:07 2010
@@ -24,6 +24,7 @@ import java.lang.management.ClassLoading
 import java.lang.management.ManagementFactory;
 
 import junit.framework.TestCase;
+import tests.support.Support_Excludes;
 
 public class ClassLoadingMXBeanTest extends TestCase {
 
@@ -40,6 +41,10 @@ public class ClassLoadingMXBeanTest exte
      * 'java.lang.management.ClassLoadingMXBean.getLoadedClassCount()'
      */
     public void testGetLoadedClassCount() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         assertTrue(mb.getLoadedClassCount() > -1);
     }
 
@@ -48,6 +53,10 @@ public class ClassLoadingMXBeanTest exte
      * 'java.lang.management.ClassLoadingMXBean.getTotalLoadedClassCount()'
      */
     public void testGetTotalLoadedClassCount() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         assertTrue(mb.getTotalLoadedClassCount() > -1);
     }
 
@@ -56,6 +65,10 @@ public class ClassLoadingMXBeanTest exte
      * 'java.lang.management.ClassLoadingMXBean.getUnloadedClassCount()'
      */
     public void testGetUnloadedClassCount() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         assertTrue(mb.getUnloadedClassCount() > -1);
     }
 
@@ -64,6 +77,10 @@ public class ClassLoadingMXBeanTest exte
      * 'java.lang.management.ClassLoadingMXBean.setVerbose(boolean)'
      */
     public void testSetVerbose() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         boolean initialVal = mb.isVerbose();
         mb.setVerbose(!initialVal);
         assertTrue(mb.isVerbose() != initialVal);

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/CompilationMXBeanTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/CompilationMXBeanTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/CompilationMXBeanTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/CompilationMXBeanTest.java Wed May 26 09:31:07 2010
@@ -24,6 +24,7 @@ import java.lang.management.CompilationM
 import java.lang.management.ManagementFactory;
 
 import junit.framework.TestCase;
+import tests.support.Support_Excludes;
 
 public class CompilationMXBeanTest extends TestCase {
 
@@ -42,6 +43,10 @@ public class CompilationMXBeanTest exten
      * Test method for 'java.lang.management.CompilationMXBean.getName()'
      */
     public void testGetName() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         assertNotNull(mb.getName());
     }
 
@@ -50,6 +55,10 @@ public class CompilationMXBeanTest exten
      * 'java.lang.management.CompilationMXBean.getTotalCompilationTime()'
      */
     public void testGetTotalCompilationTime() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         if (mb.isCompilationTimeMonitoringSupported()) {
             assertTrue(mb.getTotalCompilationTime() > -1);
         } else {

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/GarbageCollectorMXBeanTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/GarbageCollectorMXBeanTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/GarbageCollectorMXBeanTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/GarbageCollectorMXBeanTest.java Wed May 26 09:31:07 2010
@@ -25,6 +25,7 @@ import java.lang.management.ManagementFa
 import java.util.List;
 
 import junit.framework.TestCase;
+import tests.support.Support_Excludes;
 
 public class GarbageCollectorMXBeanTest extends TestCase {
 
@@ -48,6 +49,10 @@ public class GarbageCollectorMXBeanTest 
      * 'java.lang.management.GarbageCollectorMXBean.getCollectionCount()'
      */
     public void testGetCollectionCount() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         for (GarbageCollectorMXBean mb : allBeans) {
             // spec says that the collection count value may be -1 if it is
             // undefined for a given garbage collector
@@ -60,6 +65,10 @@ public class GarbageCollectorMXBeanTest 
      * 'java.lang.management.GarbageCollectorMXBean.getCollectionTime()'
      */
     public void testGetCollectionTime() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         for (GarbageCollectorMXBean mb : allBeans) {
             // spec says that the collection time value may be -1 if it is
             // undefined for a given garbage collector
@@ -72,6 +81,10 @@ public class GarbageCollectorMXBeanTest 
      * 'java.lang.management.MemoryManagerMXBean.getMemoryPoolNames()'
      */
     public void testGetMemoryPoolNames() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         for (GarbageCollectorMXBean mb : allBeans) {
             String[] managedPools = mb.getMemoryPoolNames();
             assertNotNull(managedPools);
@@ -86,6 +99,10 @@ public class GarbageCollectorMXBeanTest 
      * Test method for 'java.lang.management.MemoryManagerMXBean.getName()'
      */
     public void testGetName() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         for (GarbageCollectorMXBean mb : allBeans) {
             String name = mb.getName();
             assertNotNull(name);

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/LoggingMXBeanTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/LoggingMXBeanTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/LoggingMXBeanTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/LoggingMXBeanTest.java Wed May 26 09:31:07 2010
@@ -28,6 +28,7 @@ import java.util.logging.Logger;
 import java.util.logging.LoggingMXBean;
 
 import junit.framework.TestCase;
+import tests.support.Support_Excludes;
 
 public class LoggingMXBeanTest extends TestCase {
 
@@ -51,6 +52,10 @@ public class LoggingMXBeanTest extends T
      * Test method for 'java.util.logging.LoggingMXBean.getLoggerLevel(String)'
      */
     public void testGetLoggerLevel() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         // Verify we get something sensible back for the known loggers...
         while (loggerNamesFromMgr.hasMoreElements()) {
             String logName = (String) loggerNamesFromMgr.nextElement();
@@ -69,6 +74,10 @@ public class LoggingMXBeanTest extends T
      * Test method for 'java.util.logging.LoggingMXBean.getLoggerNames()'
      */
     public void testGetLoggerNames() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         // Logger names from the bean...
         List<String> namesFromBean = lmb.getLoggerNames();
         assertNotNull(namesFromBean);
@@ -83,6 +92,10 @@ public class LoggingMXBeanTest extends T
      * 'java.util.logging.LoggingMXBean.getParentLoggerName(String)'
      */
     public void testGetParentLoggerName() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         // Verify we get something sensible back for the known loggers...
         while (loggerNamesFromMgr.hasMoreElements()) {
             String logName = (String) loggerNamesFromMgr.nextElement();
@@ -107,6 +120,10 @@ public class LoggingMXBeanTest extends T
      * String)'
      */
     public void testSetLoggerLevel() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         String logName = null;
         while (loggerNamesFromMgr.hasMoreElements()) {
             logName = (String) loggerNamesFromMgr.nextElement();

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/ManagementFactoryTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/ManagementFactoryTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/ManagementFactoryTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/ManagementFactoryTest.java Wed May 26 09:31:07 2010
@@ -38,6 +38,7 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import junit.framework.TestCase;
+import tests.support.Support_Excludes;
 
 public class ManagementFactoryTest extends TestCase {
 
@@ -54,6 +55,10 @@ public class ManagementFactoryTest exten
      * 'java.lang.management.ManagementFactory.getClassLoadingMXBean()'
      */
     public void testGetClassLoadingMXBean() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ClassLoadingMXBean mb = ManagementFactory.getClassLoadingMXBean();
         assertNotNull(mb);
 
@@ -68,6 +73,10 @@ public class ManagementFactoryTest exten
      * 'java.lang.management.ManagementFactory.getCompilationMXBean()'
      */
     public void testGetCompilationMXBean() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         CompilationMXBean mb = ManagementFactory.getCompilationMXBean();
         assertNotNull(mb);
 
@@ -82,6 +91,10 @@ public class ManagementFactoryTest exten
      * 'java.lang.management.ManagementFactory.getGarbageCollectorMXBeans()'
      */
     public void testGetGarbageCollectorMXBeans() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         List<GarbageCollectorMXBean> allBeans = ManagementFactory
                 .getGarbageCollectorMXBeans();
         assertNotNull(allBeans);
@@ -96,6 +109,10 @@ public class ManagementFactoryTest exten
      * 'java.lang.management.ManagementFactory.getMemoryManagerMXBeans()'
      */
     public void testGetMemoryManagerMXBeans() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         List<MemoryManagerMXBean> allBeans = ManagementFactory
                 .getMemoryManagerMXBeans();
         assertNotNull(allBeans);
@@ -110,6 +127,10 @@ public class ManagementFactoryTest exten
      * 'java.lang.management.ManagementFactory.getMemoryMXBean()'
      */
     public void testGetMemoryMXBean() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         MemoryMXBean mb = ManagementFactory.getMemoryMXBean();
         assertNotNull(mb);
 
@@ -124,6 +145,10 @@ public class ManagementFactoryTest exten
      * 'java.lang.management.ManagementFactory.getMemoryPoolMXBeans()'
      */
     public void testGetMemoryPoolMXBeans() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         List<MemoryPoolMXBean> allBeans = ManagementFactory
                 .getMemoryPoolMXBeans();
         assertNotNull(allBeans);
@@ -138,6 +163,10 @@ public class ManagementFactoryTest exten
      * 'java.lang.management.ManagementFactory.getOperatingSystemMXBean()'
      */
     public void testGetOperatingSystemMXBean() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         OperatingSystemMXBean mb = ManagementFactory.getOperatingSystemMXBean();
         assertNotNull(mb);
 
@@ -153,6 +182,10 @@ public class ManagementFactoryTest exten
      * 'java.lang.management.ManagementFactory.getPlatformMBeanServer()'
      */
     public void testGetPlatformMBeanServer() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         MBeanServer pServer = ManagementFactory.getPlatformMBeanServer();
         assertNotNull(pServer);
 
@@ -170,6 +203,10 @@ public class ManagementFactoryTest exten
      * 'java.lang.management.ManagementFactory.getRuntimeMXBean()'
      */
     public void testGetRuntimeMXBean() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         RuntimeMXBean mb = ManagementFactory.getRuntimeMXBean();
         assertNotNull(mb);
 
@@ -184,6 +221,10 @@ public class ManagementFactoryTest exten
      * 'java.lang.management.ManagementFactory.getThreadMXBean()'
      */
     public void testGetThreadMXBean() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ThreadMXBean mb = ManagementFactory.getThreadMXBean();
         assertNotNull(mb);
 
@@ -199,6 +240,10 @@ public class ManagementFactoryTest exten
      * String, Class<T>) <T>'
      */
     public void testNewPlatformMXBeanProxy() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         // Test that the general case fails as expected..
 
         // MXBean name deliberately in wrong format
@@ -281,6 +326,10 @@ public class ManagementFactoryTest exten
      */
     public void testNewPlatformMXBeanProxy_ClassLoadingMXBean()
             throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ClassLoadingMXBean proxy = ManagementFactory.newPlatformMXBeanProxy(
                 ManagementFactory.getPlatformMBeanServer(),
                 "java.lang:type=ClassLoading", ClassLoadingMXBean.class);
@@ -308,6 +357,10 @@ public class ManagementFactoryTest exten
      * String, Class<T>) <T>'
      */
     public void testNewPlatformMXBeanProxy_CompilationMXBean() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         CompilationMXBean proxy = ManagementFactory.newPlatformMXBeanProxy(
                 ManagementFactory.getPlatformMBeanServer(),
                 "java.lang:type=Compilation", CompilationMXBean.class);
@@ -325,6 +378,10 @@ public class ManagementFactoryTest exten
      */
     public void testNewPlatformMXBeanProxy_GarbageCollectorMXBean()
             throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         List<GarbageCollectorMXBean> allBeans = ManagementFactory
                 .getGarbageCollectorMXBeans();
         for (GarbageCollectorMXBean mb : allBeans) {
@@ -353,6 +410,10 @@ public class ManagementFactoryTest exten
      */
     public void testNewPlatformMXBeanProxy_MemoryManagerMXBean()
             throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         List<MemoryManagerMXBean> allBeans = ManagementFactory
                 .getMemoryManagerMXBeans();
         for (MemoryManagerMXBean mb : allBeans) {
@@ -385,6 +446,10 @@ public class ManagementFactoryTest exten
      * String, Class<T>) <T>'
      */
     public void testNewPlatformMXBeanProxy_MemoryMXBean() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         MemoryMXBean proxy = ManagementFactory.newPlatformMXBeanProxy(
                 ManagementFactory.getPlatformMBeanServer(),
                 "java.lang:type=Memory", MemoryMXBean.class);
@@ -418,6 +483,10 @@ public class ManagementFactoryTest exten
      * String, Class<T>) <T>'
      */
     public void testNewPlatformMXBeanProxy_MemoryPoolMXBean() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         List<MemoryPoolMXBean> allBeans = ManagementFactory
                 .getMemoryPoolMXBeans();
         for (MemoryPoolMXBean mb : allBeans) {
@@ -447,6 +516,10 @@ public class ManagementFactoryTest exten
      */
     public void testNewPlatformMXBeanProxy_OperatingSystemMXBean()
             throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         OperatingSystemMXBean proxy = ManagementFactory.newPlatformMXBeanProxy(
                 ManagementFactory.getPlatformMBeanServer(),
                 "java.lang:type=OperatingSystem", OperatingSystemMXBean.class);
@@ -465,6 +538,10 @@ public class ManagementFactoryTest exten
      * String, Class<T>) <T>'
      */
     public void testNewPlatformMXBeanProxy_RuntimeMXBean() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         RuntimeMXBean proxy = ManagementFactory.newPlatformMXBeanProxy(
                 ManagementFactory.getPlatformMBeanServer(),
                 "java.lang:type=Runtime", RuntimeMXBean.class);
@@ -488,6 +565,10 @@ public class ManagementFactoryTest exten
      * String, Class<T>) <T>'
      */
     public void testNewPlatformMXBeanProxy_ThreadMXBean() throws Exception {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         ThreadMXBean proxy = ManagementFactory.newPlatformMXBeanProxy(
                 ManagementFactory.getPlatformMBeanServer(),
                 "java.lang:type=Threading", ThreadMXBean.class);

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/MemoryMXBeanTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/MemoryMXBeanTest.java?rev=948377&r1=948376&r2=948377&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/MemoryMXBeanTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/lang-management/src/test/api/java/org/apache/harmony/lang/management/tests/java/lang/management/MemoryMXBeanTest.java Wed May 26 09:31:07 2010
@@ -25,6 +25,7 @@ import java.lang.management.MemoryMXBean
 import java.lang.management.MemoryUsage;
 
 import junit.framework.TestCase;
+import tests.support.Support_Excludes;
 
 public class MemoryMXBeanTest extends TestCase {
 
@@ -44,6 +45,10 @@ public class MemoryMXBeanTest extends Te
      * Test method for 'java.lang.management.MemoryMXBean.getHeapMemoryUsage()'
      */
     public void testGetHeapMemoryUsage() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         MemoryUsage mu = mb.getHeapMemoryUsage();
         assertNotNull(mu);
         assertTrue(mu.getCommitted() >= mu.getUsed());
@@ -55,6 +60,10 @@ public class MemoryMXBeanTest extends Te
      * Test method for 'java.lang.management.MemoryMXBean.getNonHeapMemoryUsage()'
      */
     public void testGetNonHeapMemoryUsage() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         MemoryUsage mu = mb.getNonHeapMemoryUsage();
         assertNotNull(mu);
         assertTrue(mu.getCommitted() >= mu.getUsed());
@@ -70,6 +79,10 @@ public class MemoryMXBeanTest extends Te
      * Test method for 'java.lang.management.MemoryMXBean.getObjectPendingFinalizationCount()'
      */
     public void testGetObjectPendingFinalizationCount() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         assertTrue(mb.getObjectPendingFinalizationCount() > -1);
     }
 
@@ -77,6 +90,10 @@ public class MemoryMXBeanTest extends Te
      * Test method for 'java.lang.management.MemoryMXBean.setVerbose(boolean)'
      */
     public void testSetVerbose() {
+        if (Support_Excludes.isExcluded()) {
+            return;
+        }
+
         boolean initialVal = mb.isVerbose();
         mb.setVerbose(!initialVal);
         assertTrue(mb.isVerbose() != initialVal);



Mime
View raw message