river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter_firmst...@apache.org
Subject svn commit: r1550068 - in /river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice: ./ test_set00/ test_set02/
Date Wed, 11 Dec 2013 08:24:14 GMT
Author: peter_firmstone
Date: Wed Dec 11 08:24:13 2013
New Revision: 1550068

URL: http://svn.apache.org/r1550068
Log:
Attempting to fix test failures on Windows Server 2008 Jdk1.7.0_25, using Jenkins as test
environment.

Inspecting the code in QATestUtils, it appears that a spurious wakeup of a wait call might
cause the failing tests to wait longer than intended, in this case it is possible that there
isn't a visibility bug with Reggie, but instead it is actually canceling leases because they
have expired.

Modified:
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestUtils.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/MultipleEvntLeaseRenewals.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/MultipleSrvcLeaseRenewals.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/SrvcLeaseExpiration.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredAddAttributes.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredEventLeaseCancel.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredEventLeaseRenew.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredLeaseMapCancel.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredLeaseMapRenew.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredModifyAttributes.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredServiceLeaseCancel.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredServiceLeaseRenew.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredSetAttributes.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/LeaseMapRenew.java

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestUtils.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestUtils.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestUtils.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestUtils.java
Wed Dec 11 08:24:13 2013
@@ -412,15 +412,15 @@ public class QATestUtils {
      *  @param deltaT time increment
      *  @exception TestException usually indicates a failure
      */
-    public static void computeDurAndWait(long baseT0, long deltaT, long deltaTLimit, Object
lock) throws Exception
+    public static void computeDurAndWait(long baseT0, long deltaT, Object lock) throws Exception
     {
         long finishTime = baseT0 + deltaT;
         long dur = finishTime - System.currentTimeMillis();
 	if(dur > 0) {
             do {
                 synchronized (lock) { lock.wait(dur); }
-                if ( deltaTLimit > 0 && dur > deltaTLimit) throw new TestException("Waited
too long, exceeded limit, possibly due to lock contention");
-            } while (finishTime > System.currentTimeMillis()); // In case of spurious
wakeup or notify.
+                dur = finishTime - System.currentTimeMillis();
+            } while (dur > 0); // In case of spurious wakeup or notify.
 	} else {
             throw new TestException("Environment problem; this configuration"
                                     + " does not allow for the timing"

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/MultipleEvntLeaseRenewals.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/MultipleEvntLeaseRenewals.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/MultipleEvntLeaseRenewals.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/MultipleEvntLeaseRenewals.java
Wed Dec 11 08:24:13 2013
@@ -187,7 +187,7 @@ public class MultipleEvntLeaseRenewals e
 	    logger.log(Level.FINE, "\n**** Start trial #" + i + "****");
 	    logger.log(Level.FINE, "Waiting 3/4 of lease duration time.");
 	    numEvnt = 0;
-	    QATestUtils.computeDurAndWait(leaseStartTime, leaseWaitTime, 0, this);
+	    QATestUtils.computeDurAndWait(leaseStartTime, leaseWaitTime, this);
 	    logger.log(Level.FINE, "Renewing leases ...");
 	    leaseStartTime = QATestUtils.getCurTime();
 	    QATestUtils.doRenewLease(evntLeases, leaseDuration);
@@ -197,7 +197,7 @@ public class MultipleEvntLeaseRenewals e
 				     leaseStartTime + leaseDuration);
 	    logger.log(Level.FINE, "Waiting 1/2 of the lease duration time.");
 	    QATestUtils.computeDurAndWait(leaseStartTime, 
-					  halfDurationTime, 0, this);
+					  halfDurationTime, this);
 
 	    String transitionText = null;
 	    int transition;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/MultipleSrvcLeaseRenewals.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/MultipleSrvcLeaseRenewals.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/MultipleSrvcLeaseRenewals.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/MultipleSrvcLeaseRenewals.java
Wed Dec 11 08:24:13 2013
@@ -134,7 +134,7 @@ public class MultipleSrvcLeaseRenewals e
 	for(int i =0; i<loopCount; i++) {
 	    logger.log(Level.FINE, "\n**** Start trial #" + i + "****");
 	    logger.log(Level.FINE, "Waiting 3/4 of lease duration time.");
-	    QATestUtils.computeDurAndWait(leaseStartTime, leaseWaitTime, leaseDuration, this);
+	    QATestUtils.computeDurAndWait(leaseStartTime, leaseWaitTime, this);
 	    leaseStartTime = QATestUtils.getCurTime();
 	    logger.log(Level.FINE, "Renewing leases ...");
 	    QATestUtils.doRenewLease(srvcLeases, leaseDuration);
@@ -144,7 +144,7 @@ public class MultipleSrvcLeaseRenewals e
 				     leaseStartTime + leaseDuration);
 	    logger.log(Level.FINE, "Waiting 1/2 of the lease duration time.");
 	    QATestUtils.computeDurAndWait(leaseStartTime, 
-					  halfDurationTime, leaseDuration, this);
+					  halfDurationTime, this);
 	    logger.log(Level.FINE, "Asserting that each service proxy " +
 			      "can still be found.");
 	    QATestUtils.doLookup(srvcItems, srvcIDTmpls, proxy ); 

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/SrvcLeaseExpiration.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/SrvcLeaseExpiration.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/SrvcLeaseExpiration.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/SrvcLeaseExpiration.java
Wed Dec 11 08:24:13 2013
@@ -121,7 +121,7 @@ public class SrvcLeaseExpiration extends
 
 	logger.log(Level.FINE, "Waiting " + (leaseDuration*2) + 
 			  " milliseconds for service leases to expire.");
-	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration*2, 0, this);
+	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration*2, this);
 
 	logger.log(Level.FINE, "Checking that no services can be found.");
 	doLookupNoMatch();

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredAddAttributes.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredAddAttributes.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredAddAttributes.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredAddAttributes.java
Wed Dec 11 08:24:13 2013
@@ -68,7 +68,7 @@ public class ExpiredAddAttributes extend
 
     /** Executes the current QA test. */
     public synchronized void run() throws Exception {
-	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, 0, this);
+	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, this);
 	doAddAttributes();
     }
 

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredEventLeaseCancel.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredEventLeaseCancel.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredEventLeaseCancel.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredEventLeaseCancel.java
Wed Dec 11 08:24:13 2013
@@ -116,7 +116,7 @@ public class ExpiredEventLeaseCancel ext
    }
 
     public synchronized void run() throws Exception {
-	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, 0, this);
+	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, this);
 	doLeaseCancel();
     }
 

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredEventLeaseRenew.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredEventLeaseRenew.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredEventLeaseRenew.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredEventLeaseRenew.java
Wed Dec 11 08:24:13 2013
@@ -116,7 +116,7 @@ public class ExpiredEventLeaseRenew exte
    }
 
     public synchronized void run() throws Exception {
-	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, 0, this);
+	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, this);
 	doLeaseRenew();
     }
 

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredLeaseMapCancel.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredLeaseMapCancel.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredLeaseMapCancel.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredLeaseMapCancel.java
Wed Dec 11 08:24:13 2013
@@ -120,7 +120,7 @@ public class ExpiredLeaseMapCancel exten
    }
 
     public synchronized void run() throws Exception {
-	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, 0, this);
+	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, this);
 	doLeaseMapCancel();
 	if (!leaseMap.isEmpty())
 	    throw new TestException("map is not empty");

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredLeaseMapRenew.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredLeaseMapRenew.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredLeaseMapRenew.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredLeaseMapRenew.java
Wed Dec 11 08:24:13 2013
@@ -120,7 +120,7 @@ public class ExpiredLeaseMapRenew extend
    }
 
     public synchronized void run() throws Exception {
-	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, 0, this);
+	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, this);
 	doLeaseMapRenew();
 	if (!leaseMap.isEmpty())
 	    throw new TestException("Map is not empty");

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredModifyAttributes.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredModifyAttributes.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredModifyAttributes.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredModifyAttributes.java
Wed Dec 11 08:24:13 2013
@@ -71,7 +71,7 @@ public class ExpiredModifyAttributes ext
 
     /** Executes the current QA test. */
     public synchronized void run() throws Exception {
-	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, 0, this);
+	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, this);
 	doModifyAttributes();
     }
 

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredServiceLeaseCancel.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredServiceLeaseCancel.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredServiceLeaseCancel.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredServiceLeaseCancel.java
Wed Dec 11 08:24:13 2013
@@ -70,7 +70,7 @@ public class ExpiredServiceLeaseCancel e
 
     /** Executes the current QA test. */
     public synchronized void run() throws Exception {
-	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, 0, this);
+	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, this);
 	doLeaseCancel();
     }
 

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredServiceLeaseRenew.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredServiceLeaseRenew.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredServiceLeaseRenew.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredServiceLeaseRenew.java
Wed Dec 11 08:24:13 2013
@@ -69,7 +69,7 @@ public class ExpiredServiceLeaseRenew ex
 
     /** Executes the current QA test. */
     public synchronized void run() throws Exception {
-	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, 0, this);
+	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, this);
 	doLeaseRenew();
     }
 

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredSetAttributes.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredSetAttributes.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredSetAttributes.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/ExpiredSetAttributes.java
Wed Dec 11 08:24:13 2013
@@ -67,7 +67,7 @@ public class ExpiredSetAttributes extend
 
     /** Executes the current QA test. */
     public synchronized void run() throws Exception {
-	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, 0, this);
+	QATestUtils.computeDurAndWait(leaseStartTime, leaseDuration + 1000, this);
 	doSetAttributes();
     }
 

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/LeaseMapRenew.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/LeaseMapRenew.java?rev=1550068&r1=1550067&r2=1550068&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/LeaseMapRenew.java
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/LeaseMapRenew.java
Wed Dec 11 08:24:13 2013
@@ -168,7 +168,7 @@ public class LeaseMapRenew extends QATes
     public synchronized void run() throws Exception {
 	for(int i =0; i<loopCount; i++) {
 	    logger.log(Level.FINEST, "renewLeaseWait: " + i);
-	    QATestUtils.computeDurAndWait(leaseStartTime, leaseWaitTime, 0, this);
+	    QATestUtils.computeDurAndWait(leaseStartTime, leaseWaitTime, this);
 	    logger.log(Level.FINEST, "doRenewLease");
 	    leaseStartTime = QATestUtils.getCurTime();
 	    leaseMap.renewAll(); 
@@ -179,7 +179,7 @@ public class LeaseMapRenew extends QATes
 	    if (!mapCopy.equals(leaseMap))
 	    	throw new TestException("map contents changed");
 	    logger.log(Level.FINEST, "lookupwait");
-	    QATestUtils.computeDurAndWait(leaseStartTime, halfDurationTime, 0, this);
+	    QATestUtils.computeDurAndWait(leaseStartTime, halfDurationTime, this);
 	    logger.log(Level.FINEST, "dolookup");
 	    QATestUtils.doLookup(srvcItems, srvcIDTmpls, proxy ); 
 	    logger.log(Level.FINEST, "lookup successful");



Mime
View raw message