river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1029137 - /incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/impl/outrigger/leasing/LeaseUsesTestBase.java
Date Sat, 30 Oct 2010 18:09:01 GMT
Author: pats
Date: Sat Oct 30 18:09:00 2010
New Revision: 1029137

URL: http://svn.apache.org/viewvc?rev=1029137&view=rev
Log:
RIVER-366
Change tests to eliminate requirement that a transaction stops being available for use in
a JavaSpace write when its lease expires. This affects tests
com/sun/jini/test/impl/outrigger/leasing/UseTxnMgrSpaceLeaseTest.td and com/sun/jini/test/impl/outrigger/leasing/UseTxnMgrSpaceLeaseTestRenew.td

Modified:
    incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/impl/outrigger/leasing/LeaseUsesTestBase.java

Modified: incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/impl/outrigger/leasing/LeaseUsesTestBase.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/impl/outrigger/leasing/LeaseUsesTestBase.java?rev=1029137&r1=1029136&r2=1029137&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/impl/outrigger/leasing/LeaseUsesTestBase.java
(original)
+++ incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/impl/outrigger/leasing/LeaseUsesTestBase.java
Sat Oct 30 18:09:00 2010
@@ -192,15 +192,6 @@ public abstract class LeaseUsesTestBase 
                  */
                 final long postTime = System.currentTimeMillis();
 
-                /*
-                 * Check for late expiration against preTime
-                 * postTime - slop elemnates overflow problems when
-                 * expTime == FOREVER
-                 */
-                if (stillThere && (preTime - slop > expTime)) {
-                    throw new TestException(
-                            "Resource was available after lease expiration");
-                }
 
                 // Check for early expiration against postTime
 		logger.log(Level.FINEST, 
@@ -214,6 +205,7 @@ public abstract class LeaseUsesTestBase 
                 if (!stillThere) {
 
                     // No use testing once it is gone
+                	// or time has expired.
                     break;
                 }
 
@@ -245,6 +237,10 @@ public abstract class LeaseUsesTestBase 
                     } catch (InterruptedException e) {
                         // Should never happen, and if it does we don't care
                     }
+                } else if (postTime > expTime) {
+                	// Past expiration time and not doing any special tests
+                	// at this time.
+                	break;
                 }
             }
         }



Mime
View raw message