You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by pa...@apache.org on 2010/11/02 01:13:40 UTC
svn commit: r1029902 -
/incubator/river/jtsk/trunk/qa/src/com/sun/jini/test/impl/outrigger/leasing/LeaseUsesTestBase.java
Author: pats
Date: Tue Nov 2 00:13:40 2010
New Revision: 1029902
URL: http://svn.apache.org/viewvc?rev=1029902&view=rev
Log:
RIVER-366
Undo the previous test change.
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=1029902&r1=1029901&r2=1029902&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 Tue Nov 2 00:13:40 2010
@@ -192,6 +192,15 @@ 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,
@@ -205,7 +214,6 @@ public abstract class LeaseUsesTestBase
if (!stillThere) {
// No use testing once it is gone
- // or time has expired.
break;
}
@@ -237,10 +245,6 @@ 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;
}
}
}