You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by pe...@apache.org on 2013/01/02 06:21:08 UTC

svn commit: r1427655 [12/35] - in /river/jtsk/skunk/qa_refactor/trunk/qa: ./ doc/ src/com/sun/jini/qa/harness/ src/com/sun/jini/test/impl/discoverymanager/ src/com/sun/jini/test/impl/discoveryproviders/ src/com/sun/jini/test/impl/end2end/e2etest/ src/c...

Added: river/jtsk/skunk/qa_refactor/trunk/qa/doc/servicediscovery-test.odt
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/doc/servicediscovery-test.odt?rev=1427655&view=auto
==============================================================================
Binary file - no diff available.

Propchange: river/jtsk/skunk/qa_refactor/trunk/qa/doc/servicediscovery-test.odt
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Copied: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/LegacyTest.java (from r1424289, river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/Test.java)
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/LegacyTest.java?p2=river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/LegacyTest.java&p1=river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/Test.java&r1=1424289&r2=1427655&rev=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/Test.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/LegacyTest.java Wed Jan  2 05:20:52 2013
@@ -25,7 +25,7 @@ package com.sun.jini.qa.harness;
  *   <li> the test class is instantiated and it's no-arg constructor called.
  *        The constructor will typically perform minimal initialization, 
  *        since the test does not have access to the test environment
- *   <li> the setup method is called, passing the config object.
+ *   <li> the construct method is called, passing the config object.
  *        This provides an opportunity for performing any test setup
  *        that relies on accessing configuration parameters.
  *   <li> the run method is called to run the test
@@ -34,65 +34,5 @@ package com.sun.jini.qa.harness;
  *        even if <code>setup</code> or <code>run</code> throws an exception.
  * </ul> 
  */
-public interface Test {
-
-    /**
-     * Failure type. Indicates that a test failed because the product failed,
-     * or an unrecognized environmental failure occured. 
-     */
-    public final static int TEST = 0;
-    
-    /**
-     * Failure type. Indicates that a test failed because of a recognized
-     * environmental problem. These will typically be due to 
-     * intermittent or recurring configuration dependent failures
-     * which have been determined to result from problems external
-     * to the product.
-     */
-    public final static int ENV = 1;
-    
-    /**
-     * Failure type. Indicates that a test failed but the reason for 
-     * failure may be external to the product being tested.
-     */
-    public final static int INDEF = 2;
-
-    /** Failure type indicating that the test should not be run. */
-    public final static int SKIP = 3;
-
-    /** Failure type indicating that the test should be rerun. */
-    public final static int RERUN = 4;
-
-    /** Failure type (for analyzers) indicating failure not recognized */
-    public final static int UNKNOWN = 5;
- 
-    /**
-     * Failure type indicating no failure occured. This is a special
-     * value which should be returned by a FailureAnalyzer to indicate
-     * that the exception represents a passing condition for the test
-     */
-    public final static int PASSED = 6;
-
-    /**
-     * Performs setup for this test.  If an exception is thrown, the
-     * <code>tearDown</code> method will still be called.
-     *
-     * @param config the test properties
-     * @throws Exception if setup fails for any reason
-     */
-    public void setup(QAConfig config) throws Exception;
-
-    /**
-     * Execute the body of the test. 
-     *
-     * @throws Exception if the test fails for any reason
-     */
-    public void run() throws Exception;
-
-    /**
-     * Tears down any setup that was needed to run the test.  This method is
-     * called even if setup throws an exception, and so must be designed to
-     * be tolerant of test state that is not completely initialized.
-     */
-    public void tearDown();
+public interface LegacyTest extends TestEnvironment, Test {
 }

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterHarness.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterHarness.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterHarness.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterHarness.java Wed Jan  2 05:20:52 2013
@@ -1410,9 +1410,9 @@ class MasterHarness {
 	implements MasterTest.MasterTestRequest 
     {
 
-	public void doRequest(Test test) throws Exception {
-	    if (test instanceof QATest) {
-		((QATest) test).forceThreadDump(); // delay done by test
+	public void doRequest(TestEnvironment test) throws Exception {
+	    if (test instanceof QATestEnvironment) {
+		((QATestEnvironment) test).forceThreadDump(); // delay done by test
 	    }
 	}
     }

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterTest.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterTest.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterTest.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/MasterTest.java Wed Jan  2 05:20:52 2013
@@ -55,7 +55,7 @@ class MasterTest {
     /** The QAConfig instance, read from System.in */
     private static QAConfig config;
 
-    /** obtained from QATest after setup returns */
+    /** obtained from QATestEnvironment after construct returns */
     private static AdminManager manager;
 
     private static SlaveTest slaveTest;
@@ -186,11 +186,12 @@ class MasterTest {
      * @param td the test description for the test
      */
     private static void doTest(final TestDescription td) {
-	Test test = td.getTest();
+	TestEnvironment testEnv = td.getTest();
+        Test test = null;
 	String shortName = "<popup>" + td.getShortName() + "</popup>";
 	String progress = " " + config.getTestIndex() + " of " 
 	                   + config.getTestTotal();
-	if (test == null) {
+	if (testEnv == null) {
 	    exit(false, 
 		 Test.ENV,
 		 "Error constructing test from test description");
@@ -204,7 +205,7 @@ class MasterTest {
 	callAutot = 
 	    config.getStringConfigVal("com.sun.jini.qa.harness.callAutoT", 
 				      null);
-	if ((test instanceof QATest) && callAutot != null) {
+	if ((testEnv instanceof QATestEnvironment) && callAutot != null) {
 	    autotRequestThread.setDaemon(true);
 	    autotRequestThread.start();
 	    config.enableTestHostCalls(true);
@@ -214,11 +215,12 @@ class MasterTest {
 						  + shortName + progress));
 	try {
 	    logger.log(Level.INFO, 
-		"\n============================== CALLING SETUP() " +
+		"\n============================== CALLING CONSTRUCT() " +
 		"==============================\n");
-	    test.setup(config);
-	    if (test instanceof QATest) {
-		manager = ((QATest) test).manager;
+	    test = testEnv.construct(config);
+            if (test == null) throw new TestException("construct returned null Test");
+	    if (testEnv instanceof QATestEnvironment) {
+		manager = ((QATestEnvironment) testEnv).getManager();
 	    }
 	} catch (Throwable e) {
 	    setupOK = false;
@@ -226,8 +228,8 @@ class MasterTest {
 	    type = config.analyzeFailure(e, Test.ENV);
 	    if (type != Test.PASSED) {
 		e.printStackTrace();
-		msg = (e instanceof TestException) ? "Setup Failed"
-		                                   : "Unexpected Exception in setup";
+		msg = (e instanceof TestException) ? "Construct Failed"
+		                                   : "Unexpected Exception in construct";
 		msg += ": " + e;
 		result = false;
 	    }
@@ -246,7 +248,7 @@ class MasterTest {
 		// don't start this thread on windows to avoid hangs
 		// occuring on win2k when InetAddress.getByName was being called
 		if (! (osName.startsWith("Win"))) {
-		    Thread requestThread = new Thread(new RequestHandler(test), 
+		    Thread requestThread = new Thread(new RequestHandler(testEnv), 
 						      "RequestHandler");
 		    requestThread.setDaemon(true);
 		    requestThread.start();
@@ -277,7 +279,7 @@ class MasterTest {
 	    logger.log(Level.INFO, 
 		"\n============================ CALLING TEARDOWN() " +
 		"=============================\n");
-	    test.tearDown();
+	    testEnv.tearDown();
 	} catch (Exception e) { //ignore failures, no logical recovery
 	}
 	if (config.getTestIndex() < config.getTestTotal()) {
@@ -309,15 +311,15 @@ class MasterTest {
 
     static interface MasterTestRequest extends Serializable{
 
-	public void doRequest(Test test) throws Exception;
+	public void doRequest(TestEnvironment test) throws Exception;
     }
 
     private static class RequestHandler implements Runnable {
 
-	Test test;
+	TestEnvironment testExEnv;
 
-	RequestHandler(Test test) {
-	    this.test =test;
+	RequestHandler(TestEnvironment test) {
+	    this.testExEnv =test;
 	}
 
 	public void run() {
@@ -327,7 +329,7 @@ class MasterTest {
 		    try {
 			MasterTestRequest request = 
 			    (MasterTestRequest) ois.readObject();
-			request.doRequest(test);
+			request.doRequest(testExEnv);
 		    } catch (Exception e) {
 			logger.log(Level.SEVERE, 
 				   "Exception processing request",

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QAConfig.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QAConfig.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QAConfig.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QAConfig.java Wed Jan  2 05:20:52 2013
@@ -2016,14 +2016,14 @@ public class QAConfig implements Seriali
     /**
      * Analyze a failure exception. All registered analyzers are 
      * called with the given exception in the order registered. If an
-     * analyzer returns a value other than Test.UNKNOWN then that value
-     * is returned by this method. If all analyzers return Test.UNKNOWN,
+     * analyzer returns a value other than LegacyTest.UNKNOWN then that value
+     * is returned by this method. If all analyzers return LegacyTest.UNKNOWN,
      * or if no analyzers are registered, then this method returns the
      * given default value.
      *
      * @param e the exception to analyze
      * @param defaultType the default failure type to return if all analyzers
-     *                    return <code>Test.UNKNOWN</code>, or if there are no
+     *                    return <code>LegacyTest.UNKNOWN</code>, or if there are no
      *                    registered analyzers
      * @return the failure type
      */
@@ -2511,7 +2511,7 @@ public class QAConfig implements Seriali
 
     /**
      * Obtain the test overrides from the set of installed overrider
-     * providers. Test overrides have a <code>serviceName</code> of
+     * providers. LegacyTest overrides have a <code>serviceName</code> of
      * <code>null</code>.
      *
      * @return a (possibly zero length) array of overrides

Copied: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QATestEnvironment.java (from r1424289, river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QATest.java)
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QATestEnvironment.java?p2=river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QATestEnvironment.java&p1=river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QATest.java&r1=1424289&r2=1427655&rev=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QATest.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/QATestEnvironment.java Wed Jan  2 05:20:52 2013
@@ -28,6 +28,8 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
 import java.util.logging.Logger;
 import java.util.logging.Level;
 
@@ -36,30 +38,29 @@ import net.jini.core.lease.UnknownLeaseE
 
 /**
  * A base class for tests to be run by the harness.
- * It partially implements the <code>com.sun.jini.qa.harness.Test</code> interface.
- * Minimal implementations for <code>setup</code> and <code>teardown</code>
+ * It implements the <code>com.sun.jini.qa.harness.TestEnvironment</code> interface.
+ * Minimal implementations for <code>construct</code> and <code>teardown</code>
  * are provided. Subclasses of this class are responsible for implementing
- * the <code>run</code> method, and may override
- * <code>setup</code> and <code>teardown</code> to add test specific
+ * the <code>com.sun.jini.qa.harness.Test</code> interface <code>run</code> method, and may override
+ * <code>construct</code> and <code>teardown</code> to add test specific
  * initialization and cleanup operations.
  * <p>
  * A protected <code>logger</code> is instantiated by this class for use
  * by subclasses, with the logger name <code>com.sun.jini.qa.harness.test</code>.
  */
-public abstract class QATest implements Test {
+public abstract class QATestEnvironment implements TestEnvironment {
 
     /** the logger */
     protected static final Logger logger = 
 	Logger.getLogger("com.sun.jini.qa.harness");
 
     /** Keeps track of leases for automatic cancellation when test ends. */
-    private final Collection<Lease> leaseArray = new ArrayList<Lease>();
-
+    private final Collection<Lease> leaseArray = new ArrayList<Lease>();//access must be synchronized
     /** The admin manager for managing services */
-    protected volatile AdminManager manager;
+    private volatile AdminManager manager;
 
     /** The config object for accessing the test environment */
-    protected volatile QAConfig config;
+    private volatile QAConfig config;
 
     /** 
      * Mostly mimics the behavior of the assert keyword. 
@@ -105,7 +106,7 @@ public abstract class QATest implements 
     /**
      * This method is called by the <code>MasterTest</code> immediately before
      * the run method is called. Override this method to implement test specific
-     * setup code.  This method:
+     * construct code.  This method:
      * <ul>
      *   <li>saves a reference to <code>config</code>
      *   <li>starts the class server identified by the 
@@ -120,11 +121,11 @@ public abstract class QATest implements 
      * <P>
      * In the majority of cases this method will be overridden. The first action
      * taken by the method should be a call to
-     * <code>super.setup(sysConfig)</code>.
+     * <code>super.construct(sysConfig)</code>.
      * 
-     * @throws Exception if any failure occurs during setup  
+     * @throws Exception if any failure occurs during construct  
      */
-    public void setup(QAConfig config) throws Exception {
+    public Test construct(QAConfig config) throws Exception {
 	int delayTime = 
 	    config.getIntConfigVal("com.sun.jini.qa.harness.startDelay", 0);
 	if (delayTime > 0) {
@@ -138,14 +139,14 @@ public abstract class QATest implements 
 	if (config.getBooleanConfigVal("com.sun.jini.qa.harness.runkitserver", 
 				       true)) 
 	{
-	    manager.startService("qaClassServer");
+	    getManager().startService("qaClassServer");
 	    SlaveRequest request = new StartClassServerRequest("qaClassServer");
 	    SlaveTest.broadcast(request);
 	}
 	if (config.getBooleanConfigVal("com.sun.jini.qa.harness.runjiniserver", 
 				       true)) 
 	{
-	    manager.startService("jiniClassServer");
+	    getManager().startService("jiniClassServer");
 	    SlaveRequest request = 
 		new StartClassServerRequest("jiniClassServer");
 	    SlaveTest.broadcast(request);
@@ -154,11 +155,18 @@ public abstract class QATest implements 
 	    config.getStringConfigVal("com.sun.jini.qa.harness.testClassServer",
 				      "");
 	if (testClassServer.trim().length() > 0) {
-	    manager.startService("testClassServer");
+	    getManager().startService("testClassServer");
 	    SlaveRequest request = 
 		new StartClassServerRequest(testClassServer);
 	    SlaveTest.broadcast(request);
 	}
+        return new Test(){
+
+            public void run() throws Exception {
+                // Do nothing
+            }
+            
+        };
     }
 
     /**
@@ -176,11 +184,11 @@ public abstract class QATest implements 
      */
     public void tearDown() {
 	cancelTrackedLeases();
-	if (manager != null) { // null if test didn't call super.setup
+	if (getManager() != null) { // null if test didn't call super.construct
 	    try {
 		logger.log(Level.FINE, 
 			   "Destroying remaining managed services");
-		manager.destroyAllServices();
+		getManager().destroyAllServices();
 	    } catch (Exception ex) {
 		logger.log(Level.INFO, 
 			   "Unexpected exception while cleaning up services",
@@ -196,7 +204,9 @@ public abstract class QATest implements 
      * @param lease the Lease to add to the tracking array
      */
     public void trackLease(Lease lease) {
-	leaseArray.add(lease);
+        synchronized (leaseArray){
+            leaseArray.add(lease);
+        }
     }
 
     /**
@@ -207,9 +217,16 @@ public abstract class QATest implements 
      * leases are discarded.
      */
     public void cancelTrackedLeases() {
-	Iterator iter = leaseArray.iterator();
+        // copy leaseArray to avoid calling remote method while synchronized.
+        Collection<Lease> cancel;
+        synchronized (leaseArray){
+            cancel = new ArrayList<Lease>(leaseArray.size());
+            cancel.addAll(leaseArray);
+            leaseArray.clear();
+        }
+	Iterator<Lease> iter = cancel.iterator();
 	while (iter.hasNext()) {
-	   Lease lease = (Lease) iter.next();
+	   Lease lease = iter.next();
 	   try {
 	       lease.cancel();
 	   } catch (UnknownLeaseException ignore) {
@@ -217,12 +234,11 @@ public abstract class QATest implements 
 	       logger.log(Level.INFO, "Failed to cancel lease", ex);
 	   }
 	}
-	leaseArray.clear();
     }
 
     // delay is done here in case multiple groups are present
     public void forceThreadDump() {
-	Iterator it = manager.iterator();
+	Iterator it = getManager().iterator();
 	while (it.hasNext()) {
 	    Object admin = it.next();
 	    if (admin instanceof NonActivatableGroupAdmin) {
@@ -235,4 +251,12 @@ public abstract class QATest implements 
 	    }
 	}
     }
+
+    /**
+     * @return the manager
+     */
+    protected AdminManager getManager() {
+            return manager;
+    }
+
 }

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/Test.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/Test.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/Test.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/Test.java Wed Jan  2 05:20:52 2013
@@ -18,81 +18,52 @@
 package com.sun.jini.qa.harness;
 
 /**
- * This interface must implemented by all tests supported by the test
- * harness.  The following sequence of events is performed for each
- * test:
- * <p><ul>
- *   <li> the test class is instantiated and it's no-arg constructor called.
- *        The constructor will typically perform minimal initialization, 
- *        since the test does not have access to the test environment
- *   <li> the setup method is called, passing the config object.
- *        This provides an opportunity for performing any test setup
- *        that relies on accessing configuration parameters.
- *   <li> the run method is called to run the test
- *   <li> the teardown method is called to clean up state or services
- *        created by the test. This method is called
- *        even if <code>setup</code> or <code>run</code> throws an exception.
- * </ul> 
+ *
+ * @author peter
  */
 public interface Test {
-
-    /**
-     * Failure type. Indicates that a test failed because the product failed,
-     * or an unrecognized environmental failure occured. 
-     */
-    public final static int TEST = 0;
-    
     /**
      * Failure type. Indicates that a test failed because of a recognized
-     * environmental problem. These will typically be due to 
+     * environmental problem. These will typically be due to
      * intermittent or recurring configuration dependent failures
      * which have been determined to result from problems external
      * to the product.
      */
-    public final static int ENV = 1;
-    
+    int ENV = 1;
     /**
-     * Failure type. Indicates that a test failed but the reason for 
+     * Failure type. Indicates that a test failed but the reason for
      * failure may be external to the product being tested.
      */
-    public final static int INDEF = 2;
-
-    /** Failure type indicating that the test should not be run. */
-    public final static int SKIP = 3;
-
-    /** Failure type indicating that the test should be rerun. */
-    public final static int RERUN = 4;
-
-    /** Failure type (for analyzers) indicating failure not recognized */
-    public final static int UNKNOWN = 5;
- 
+    int INDEF = 2;
     /**
      * Failure type indicating no failure occured. This is a special
      * value which should be returned by a FailureAnalyzer to indicate
      * that the exception represents a passing condition for the test
      */
-    public final static int PASSED = 6;
-
+    int PASSED = 6;
     /**
-     * Performs setup for this test.  If an exception is thrown, the
-     * <code>tearDown</code> method will still be called.
-     *
-     * @param config the test properties
-     * @throws Exception if setup fails for any reason
+     * Failure type indicating that the test should be rerun.
      */
-    public void setup(QAConfig config) throws Exception;
-
+    int RERUN = 4;
     /**
-     * Execute the body of the test. 
-     *
-     * @throws Exception if the test fails for any reason
+     * Failure type indicating that the test should not be run.
+     */
+    int SKIP = 3;
+    /**
+     * Failure type. Indicates that a test failed because the product failed,
+     * or an unrecognized environmental failure occured.
      */
-    public void run() throws Exception;
+    int TEST = 0;
+    /**
+     * Failure type (for analyzers) indicating failure not recognized
+     */
+    int UNKNOWN = 5;
 
     /**
-     * Tears down any setup that was needed to run the test.  This method is
-     * called even if setup throws an exception, and so must be designed to
-     * be tolerant of test state that is not completely initialized.
+     * Execute the body of the test.
+     *
+     * @throws Exception if the test fails for any reason
      */
-    public void tearDown();
+    void run() throws Exception;
+    
 }

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/TestDescription.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/TestDescription.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/TestDescription.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/TestDescription.java Wed Jan  2 05:20:52 2013
@@ -41,7 +41,7 @@ import java.util.StringTokenizer;
  * <ul>
  * <li><code>testClass</code>, the fully qualified name of the test
  *     implementation class to be run. This class must implement the 
- *     <code>com.sun.jini.qa.harness.Test</code> interface. A definition
+ *     <code>com.sun.jini.qa.harness.LegacyTest</code> interface. A definition
  *     for this parameter must be included in the <code>Properties</code>
  *     object provided in the constructor for this class. 
  * <li><code>testCategories</code>, the test categories associated with this
@@ -110,19 +110,19 @@ public class TestDescription implements 
 	Logger.getLogger("com.sun.jini.qa.harness.test");
 
     /**  The name of this <code>TestDescription</code> */
-    private String name;
+    private final String name;
 
     /** The config object */
-    private QAConfig config;
+    private final QAConfig config;
 
     /** The properties stored by this test description */
-    private Properties properties = new Properties();
+    private final Properties properties;
 
     /** A flag to be returned by the <code>nextConfiguration</code> call */
     boolean nextConf = true;
 
     /** The test provided by this descriptor */
-    Test test;
+    TestEnvironment test;
 
     /**
      * Construct a test description for a test with the given <code>name</code>.
@@ -357,20 +357,22 @@ public class TestDescription implements 
      * @return the test instance, or <code>null</code> if the test could not
      *          be instantiated
      */
-    Test getTest() {
+    TestEnvironment getTest() {
 	String className = getTestClassName();
 	// this method is called from the test vm, so the config.getTestLoader
 	// method must not be used, since it's value is null
 	if (className != null) {
 	    try {
 		Class testClass = Class.forName(className);
-		test = (Test) testClass.newInstance();
+		test = (TestEnvironment) testClass.newInstance();
 	    } catch (Throwable e) {
 		logger.log(Level.INFO, 
 			   "Failed to instantiate " + className,
 			   e);
 	    }
-	    }
+        } else {
+            logger.log(Level.INFO, "test class name was null");
+        }
 	return test;
     }
 

Added: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/TestEnvironment.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/TestEnvironment.java?rev=1427655&view=auto
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/TestEnvironment.java (added)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/TestEnvironment.java Wed Jan  2 05:20:52 2013
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.sun.jini.qa.harness;
+/**
+ * This interface must implemented by all tests supported by the test
+ * harness.  The following sequence of events is performed for each
+ * test:
+ * <p><ul>
+ *   <li> the test environment class is instantiated and it's no-arg constructor called.
+ *        The constructor will typically perform minimal initialization, 
+ *        since the test environment does not have access to the test description
+ *   <li> the construct method is called, passing the config object derived from the test description.
+ *        This provides an opportunity for performing any test construction
+ *        that relies on accessing configuration parameters.
+ *   <li> the run method is called to run the test returned by the construct method.
+ *   <li> the teardown method is called to clean up state or services
+ *        created by the test. This method is called
+ *        even if <code>construct</code> or <code>run</code> throws an exception.
+ * </ul> 
+ */
+public interface TestEnvironment {
+
+    /**
+     * Constructs a test and its environment.  
+     * If an exception is thrown, the <code>tearDown</code> method will 
+     * still be called.
+     *
+     * @param config the test properties
+     * @return Test to run.
+     * @throws Exception if construct fails for any reason
+     */
+    Test construct(QAConfig config) throws Exception;
+
+    /**
+     * Tears down any construct that was needed to run the test.  This method is
+     * called even if construct throws an exception, and so must be designed to
+     * be tolerant of test state that is not completely initialized.
+     */
+    void tearDown();
+    
+}

Propchange: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/TestEnvironment.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoverymanager/BadDiscoveryListener.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoverymanager/BadDiscoveryListener.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoverymanager/BadDiscoveryListener.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoverymanager/BadDiscoveryListener.java Wed Jan  2 05:20:52 2013
@@ -98,7 +98,7 @@ public class BadDiscoveryListener extend
         }
         logger.log(Level.FINE, "adding a new listener to the "
                 + "lookup discovery manager ... ");
-        newListener.setLookupsToDiscover(initLookupsToStart,
+        newListener.setLookupsToDiscover(getLookupServices().getInitLookupsToStart(),
                 locatorsToDiscover, groupsToDiscover);
         discoveryMgr.addDiscoveryListener(newListener);
         waitForDiscovery(newListener);

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoverymanager/RemoveGroupsLocsDiscard.java Wed Jan  2 05:20:52 2013
@@ -29,6 +29,7 @@ import net.jini.discovery.DiscoveryGroup
 import net.jini.core.discovery.LookupLocator;
 
 import com.sun.jini.qa.harness.QAConfig;
+import java.util.List;
 
 /**
  * This class acts as a regression test for bug ID 4510435. This class verifies
@@ -90,7 +91,7 @@ public class RemoveGroupsLocsDiscard ext
      */
     public void run() throws Exception {
         logger.log(Level.FINE, "run()");
-
+        List initLookupsToStart = getLookupServices().getInitLookupsToStart();
         /* From the lookups that have been started, retrieve the groups
          * and locators to discover. We want a "mix" where some of the
          * lookups started should be discovered by both group and locator,

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoveryproviders/DiscoveryV2CachingTest.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoveryproviders/DiscoveryV2CachingTest.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoveryproviders/DiscoveryV2CachingTest.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/discoveryproviders/DiscoveryV2CachingTest.java Wed Jan  2 05:20:52 2013
@@ -19,7 +19,7 @@
 package com.sun.jini.test.impl.discoveryproviders;
 //harness imports
 import com.sun.jini.qa.harness.QAConfig;
-import com.sun.jini.qa.harness.Test;
+import com.sun.jini.qa.harness.LegacyTest;
 
 import java.lang.ref.Reference;
 import java.lang.ref.WeakReference;
@@ -29,15 +29,17 @@ import java.net.URL;
 import java.util.List;
 import java.util.LinkedList;
 import com.sun.jini.discovery.Discovery;
+import com.sun.jini.qa.harness.Test;
 
-// Need to refactor Test methods to an abstract base class if more tests are
+// Need to refactor LegacyTest methods to an abstract base class if more tests are
 // created in this category.
-public class DiscoveryV2CachingTest implements Test {
+public class DiscoveryV2CachingTest implements LegacyTest {
     protected static QAConfig sysConfig;
 
     //inherit javadoc
-    public void setup(QAConfig config) {
+    public Test construct(QAConfig config) {
         sysConfig = config;
+        return this;
     }
 
     //inherit javadoc
@@ -104,7 +106,7 @@ public class DiscoveryV2CachingTest impl
      * mappings are not pinned unnecessarily.
      * 2. It ensures that discovery instances are garbage collected when
      * memory runs low.
-     * Test 1,2 throws java.lang.AssertionError on failure.
+     * LegacyTest 1,2 throws java.lang.AssertionError on failure.
      *
      */
     public void run() throws Exception {

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/end2end/e2etest/Driver.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/end2end/e2etest/Driver.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/end2end/e2etest/Driver.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/end2end/e2etest/Driver.java Wed Jan  2 05:20:52 2013
@@ -21,6 +21,7 @@ import java.util.logging.Level;
 
 import com.sun.jini.qa.harness.TestException;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.LegacyTest;
 import com.sun.jini.qa.harness.Test;
 
 import java.io.BufferedReader;
@@ -43,9 +44,9 @@ import java.util.Properties;
 
 /**
  * This class acts as a wrapper that enable the End2End security test
- * to run as a <code>com.sun.jini.qa.harness.Test</code>
+ * to run as a <code>com.sun.jini.qa.harness.LegacyTest</code>
  */
-public class Driver implements Test {
+public class Driver implements LegacyTest {
 
     private QAConfig config;
     private File error;
@@ -62,12 +63,12 @@ public class Driver implements Test {
         + "end2end.e2etest.Driver");
 
     /**
-     * The <code>setup</code> method creates the creates output files for the
+     * The <code>construct</code> method creates the creates output files for the
      * test and also runs a user specified kinit command in order to populate
      * the kerberos ticket cache with a forwardable ticket.  This is done
      * only if the kerberos provider is being used.
      */
-    public void setup(QAConfig config) throws Exception {
+    public Test construct(QAConfig config) throws Exception {
         this.config = config;
         createStreams();
         String props = config.getStringConfigVal(
@@ -78,6 +79,7 @@ public class Driver implements Test {
             .getStringConfigVal("com.sun.jini.qa.harness.assertions","")
             + " -cp " + config.getStringConfigVal("testClassPath",null)
             + " com.sun.jini.test.impl.end2end.e2etest.End2EndTest";
+        return this;
     }
 
     /**
@@ -100,7 +102,7 @@ public class Driver implements Test {
     }
 
     /**
-     * Dummy method to satisfy <code>com.sun.jini.qa.harness.Test</code>
+     * Dummy method to satisfy <code>com.sun.jini.qa.harness.LegacyTest</code>
      * interface.
      */
     public void tearDown() {

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/ProxyToString.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/ProxyToString.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/ProxyToString.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/ProxyToString.java Wed Jan  2 05:20:52 2013
@@ -25,6 +25,7 @@ import com.sun.jini.test.spec.discoverys
 import com.sun.jini.test.share.DiscoveryServiceUtil;
 
 import com.sun.jini.fiddler.FiddlerAdmin;
+import com.sun.jini.qa.harness.Test;
 
 import net.jini.admin.Administrable;
 
@@ -61,9 +62,9 @@ public class ProxyToString extends Abstr
      *  Requests a registration with the service; obtains a registration proxy.
      *  Retrieves the lease on the registration.
      */
-    public void setup(QAConfig config) throws Exception {
+    public Test construct(QAConfig config) throws Exception {
 
-        super.setup(config);//start fiddler and retrieve the service proxy
+        super.construct(config);//start fiddler and retrieve the service proxy
 
         fiddlerProxy = discoverySrvc;//discoverySrvc set in AbstractBaseTest
 
@@ -83,11 +84,11 @@ public class ProxyToString extends Abstr
                                 new DiscoveryServiceUtil.BasicEventListener());
 
         fiddlerLease = getPreparedLease(fiddlerRegistration);
-
-    }//end setup
+        return this;
+    }//end construct
 
     /** Invokes the <code>toString</code> method on each of the proxies
-     *  retrieved during setup and logs the results. If no exception occurs,
+     *  retrieved during construct and logs the results. If no exception occurs,
      *  then this test passes. The output should then be inspected to verify
      *  that each method produces a <code>String</code> with the intended
      *  content and format.

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetLeaseDurationBound.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetLeaseDurationBound.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetLeaseDurationBound.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetLeaseDurationBound.java Wed Jan  2 05:20:52 2013
@@ -31,6 +31,7 @@ import net.jini.discovery.LookupDiscover
 
 import java.rmi.RemoteException;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -49,12 +50,13 @@ public class GetLeaseDurationBound exten
      *  tests's configuration property file, the value of the lease duration
      *  bound with which the service is expected to be initially configured.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         expectedValue = 
 	    config.getLongConfigVal(serviceName + ".leasedurationbound", 0);
         logger.log(Level.FINE, "expectedValue = " + expectedValue);
-    }//end setup
+        return this;
+    }//end construct
 
     /** Executes the current test by doing the following:
      *  

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetLogToSnapshotThreshold.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetLogToSnapshotThreshold.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetLogToSnapshotThreshold.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetLogToSnapshotThreshold.java Wed Jan  2 05:20:52 2013
@@ -31,6 +31,7 @@ import net.jini.discovery.LookupDiscover
 
 import java.rmi.RemoteException;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -52,12 +53,13 @@ public class GetLogToSnapshotThreshold e
      *  threshold with which the service is expected to be initially
      *  configured.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         expectedValue = 
 	    config.getIntConfigVal(serviceName +".logtosnapshotthreshold",0);
         logger.log(Level.FINE, "expectedValue = " + expectedValue);
-    }//end setup
+        return this;
+    }//end construct
 
     /** Executes the current test by doing the following:
      *  

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetSnapshotWeight.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetSnapshotWeight.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetSnapshotWeight.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/GetSnapshotWeight.java Wed Jan  2 05:20:52 2013
@@ -32,6 +32,7 @@ import net.jini.discovery.LookupDiscover
 import java.rmi.RemoteException;
 import java.util.Properties;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -52,11 +53,12 @@ public class GetSnapshotWeight extends A
      *  weight factor with which the service is expected to be initially
      *  configured.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         expectedValue = 
 	    config.getFloatConfigVal(serviceName + ".snapshotweight", 0);
         logger.log(Level.FINE, "expectedValue = " + expectedValue);
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetLeaseDurationBound.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetLeaseDurationBound.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetLeaseDurationBound.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetLeaseDurationBound.java Wed Jan  2 05:20:52 2013
@@ -31,6 +31,7 @@ import net.jini.discovery.LookupDiscover
 
 import java.rmi.RemoteException;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -49,11 +50,12 @@ public class SetLeaseDurationBound exten
      *  which to replace the lease duration bound with which the service
      *  is expected to be initially configured.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         expectedValue = 1+(2*config.getLongConfigVal(serviceName
                                                   + ".leasedurationbound", 0));
         logger.log(Level.FINE, "expectedValue = " + expectedValue);
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetLogToSnapshotThreshold.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetLogToSnapshotThreshold.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetLogToSnapshotThreshold.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetLogToSnapshotThreshold.java Wed Jan  2 05:20:52 2013
@@ -31,6 +31,7 @@ import net.jini.discovery.LookupDiscover
 
 import java.rmi.RemoteException;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -51,11 +52,12 @@ public class SetLogToSnapshotThreshold e
      *  which to replace the value of the service's current log-to-snapshot
      *  threshold.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         expectedValue = 1+(2*config.getIntConfigVal(serviceName
                                                 +".logtosnapshotthreshold",0));
         logger.log(Level.FINE, "expectedValue = "+expectedValue);
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetSnapshotWeight.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetSnapshotWeight.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetSnapshotWeight.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/fiddleradmin/SetSnapshotWeight.java Wed Jan  2 05:20:52 2013
@@ -31,6 +31,7 @@ import net.jini.discovery.LookupDiscover
 
 import java.rmi.RemoteException;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -50,11 +51,12 @@ public class SetSnapshotWeight extends A
      *  which to replace the value of the service's current snapshot weight
      *  factor.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         expectedValue = 1+(2*config.getFloatConfigVal(serviceName
                                                    +".snapshotweight",0));
         logger.log(Level.FINE, "expectedValue = "+expectedValue);
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupAttributes.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupAttributes.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupAttributes.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupAttributes.java Wed Jan  2 05:20:52 2013
@@ -27,6 +27,7 @@ import com.sun.jini.test.share.JoinAdmin
 
 import com.sun.jini.qa.harness.TestException;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 import net.jini.admin.JoinAdmin;
 import net.jini.discovery.LookupDiscoveryService;
@@ -73,8 +74,8 @@ public class AddLookupAttributes extends
      *  set of attributes that should be expected after adding a new set
      *  to the service.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         Entry[] configAttributes = getConfigAttributeSet();
         newAttributeSet = getTestAttributeSet();
         boolean serviceControlled = false;
@@ -113,7 +114,8 @@ public class AddLookupAttributes extends
 					      "expectedAttrs",
 					      Level.FINE);
         }
-    }//end setup
+        return this;
+    }//end construct
 
     /** Executes the current test by doing the following:
      *  

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupGroups.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupGroups.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupGroups.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupGroups.java Wed Jan  2 05:20:52 2013
@@ -34,6 +34,7 @@ import net.jini.discovery.LookupDiscover
 import java.rmi.RemoteException;
 import com.sun.jini.qa.harness.AbstractServiceAdmin;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -75,13 +76,13 @@ public class AddLookupGroups extends Abs
      *  Starts one lookup discovery service, and then constructs the set
      *  of groups that should be expected after adding a new set of groups.
      */
-    public void setup(com.sun.jini.qa.harness.QAConfig sysConfig) throws Exception {
-        super.setup(sysConfig);
+    public Test construct(com.sun.jini.qa.harness.QAConfig sysConfig) throws Exception {
+        super.construct(sysConfig);
         newGroupSet = getTestGroupSet();
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         if (admin == null) {
-            return;
+            return this;
         }
         String[] configGroups = admin.getGroups();
         /* Construct the expected groups set */
@@ -105,6 +106,7 @@ public class AddLookupGroups extends Abs
 					   Level.FINE);
             }
         }
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupGroupsDups.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupGroupsDups.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupGroupsDups.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupGroupsDups.java Wed Jan  2 05:20:52 2013
@@ -61,7 +61,7 @@ public class AddLookupGroupsDups extends
      */
     String[] getTestGroupSet() {
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         return GroupsUtil.getGroupsWithDups(admin.getGroups());
     }
 }

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupLocators.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupLocators.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupLocators.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupLocators.java Wed Jan  2 05:20:52 2013
@@ -37,6 +37,7 @@ import java.net.MalformedURLException;
 import java.rmi.RemoteException;
 import com.sun.jini.qa.harness.AbstractServiceAdmin;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -78,13 +79,13 @@ public class AddLookupLocators extends A
      *  Starts one lookup discovery service, and then constructs the set
      *  of locators that should be expected after adding a new set of locators.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         newLocatorSet = getTestLocatorSet();
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         if (admin == null) {
-            return;
+            return this;
         }
         LookupLocator[] configLocators = admin.getLocators();
 
@@ -111,7 +112,8 @@ public class AddLookupLocators extends A
                                                Level.FINE);
             }
         }
-    }//end setup
+        return this;
+    }//end construct
 
     /** Executes the current test by doing the following:
      *  

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupLocatorsDups.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupLocatorsDups.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupLocatorsDups.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupLocatorsDups.java Wed Jan  2 05:20:52 2013
@@ -68,7 +68,7 @@ public class AddLookupLocatorsDups exten
      *  parent class' version of this method)
      */
     LookupLocator[] getTestLocatorSet() throws MalformedURLException {
-	AbstractServiceAdmin admin = (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	AbstractServiceAdmin admin = (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         return LocatorsUtil.getLocatorsWithDups(admin.getLocators());
     }
 }

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupAttributes.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupAttributes.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupAttributes.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupAttributes.java Wed Jan  2 05:20:52 2013
@@ -27,6 +27,7 @@ import com.sun.jini.test.share.JoinAdmin
 
 import com.sun.jini.qa.harness.TestException;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 import net.jini.admin.JoinAdmin;
 import net.jini.discovery.LookupDiscoveryService;
@@ -50,8 +51,8 @@ public class GetLookupAttributes extends
      *  is expected to be configured (can be overridden by sub-classes)
      */
     Entry[] getTestAttributeSet() {
-        return new Entry[] {AttributesUtil.getServiceInfoEntryFromConfig(config),
-                            AttributesUtil.getBasicServiceTypeFromConfig(config)
+        return new Entry[] {AttributesUtil.getServiceInfoEntryFromConfig(getConfig()),
+                            AttributesUtil.getBasicServiceTypeFromConfig(getConfig())
                            };
     }
 
@@ -62,12 +63,13 @@ public class GetLookupAttributes extends
      *  set of attributes with which the service is expected to be 
      *  configured.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         expectedAttributes = getTestAttributeSet();
         AttributesUtil.displayAttributeSet(expectedAttributes,
                                            "expectedAttributes",
                                            Level.FINE);
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupGroups.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupGroups.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupGroups.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupGroups.java Wed Jan  2 05:20:52 2013
@@ -34,6 +34,7 @@ import net.jini.discovery.LookupDiscover
 
 import java.rmi.RemoteException;
 import com.sun.jini.qa.harness.AbstractServiceAdmin;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -68,12 +69,12 @@ public class GetLookupGroups extends Abs
      *  are the lookup service(s) that the lookup discovery service is
      *  expected to attempt to join.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         if (admin == null) {
-            return;
+            return this;
         }
         expectedGroups = admin.getGroups();
         if(expectedGroups != DiscoveryGroupManagement.ALL_GROUPS){
@@ -91,6 +92,7 @@ public class GetLookupGroups extends Abs
         } else {
             logger.log(Level.FINE, "expectedGroups = ALL_GROUPS");
         }
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupLocators.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupLocators.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupLocators.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/GetLookupLocators.java Wed Jan  2 05:20:52 2013
@@ -35,6 +35,7 @@ import net.jini.core.discovery.LookupLoc
 
 import java.rmi.RemoteException;
 import com.sun.jini.qa.harness.AbstractServiceAdmin;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -59,15 +60,15 @@ public class GetLookupLocators extends A
      *  member(s) correspond to the specific the lookup service(s) that
      *  the lookup discovery service is expected to attempt to join.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         String joinStr = 
 	    config.getStringConfigVal(serviceName + ".tojoin", null);
         logger.log(Level.FINE, "joinStr from QAConfig = " + joinStr);
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         if (admin == null) {
-            return;
+            return this;
         }
         expectedLocators = admin.getLocators();
         if(expectedLocators != null){
@@ -82,6 +83,7 @@ public class GetLookupLocators extends A
         } else {
             logger.log(Level.FINE, "expectedLocators = null");
         }
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/ModifyLookupAttributes.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/ModifyLookupAttributes.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/ModifyLookupAttributes.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/ModifyLookupAttributes.java Wed Jan  2 05:20:52 2013
@@ -26,6 +26,7 @@ import com.sun.jini.test.share.Attribute
 import com.sun.jini.test.share.JoinAdminUtil;
 
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 import com.sun.jini.qa.harness.TestException;
 
 import net.jini.admin.JoinAdmin;
@@ -101,8 +102,8 @@ public class ModifyLookupAttributes exte
      *  set of attributes that should be expected after adding and then
      *  modifying a new set of attributes.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         Entry[] configAttributes = getConfigAttributeSet();
         newAttributeSet = getTestAttributeSet();
 
@@ -147,6 +148,7 @@ public class ModifyLookupAttributes exte
                                                "expectedAttrs",
                                                Level.FINE);
         }
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupGroups.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupGroups.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupGroups.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupGroups.java Wed Jan  2 05:20:52 2013
@@ -35,6 +35,7 @@ import net.jini.discovery.LookupDiscover
 import java.rmi.RemoteException;
 import java.util.ArrayList;
 import com.sun.jini.qa.harness.AbstractServiceAdmin;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -68,7 +69,7 @@ public class RemoveLookupGroups extends 
      */
     String[] getTestGroupSet() {	
         AbstractServiceAdmin admin =
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         return GroupsUtil.getSubset(admin.getGroups());
     }
 
@@ -78,13 +79,13 @@ public class RemoveLookupGroups extends 
      *  Starts one lookup discovery service, and then constructs the set
      *  of groups that should be expected after removing a set of groups.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         removeGroupSet = getTestGroupSet();
         AbstractServiceAdmin admin =
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         if (admin == null) {
-            return;
+            return this;
         }
         String[] configGroups = admin.getGroups();
 
@@ -116,6 +117,7 @@ public class RemoveLookupGroups extends 
 					   Level.FINE);
             }
         }
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupGroupsDups.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupGroupsDups.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupGroupsDups.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupGroupsDups.java Wed Jan  2 05:20:52 2013
@@ -55,7 +55,7 @@ public class RemoveLookupGroupsDups exte
     String[] getTestGroupSet() {
         /* First retrieve a sub-set of the initial groups */
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         String[] subsetCurGroups = GroupsUtil.getSubset(admin.getGroups());
         /* Next, use the above sub-set to construct a set with duplicates */
         return GroupsUtil.getGroupsWithDups(subsetCurGroups);

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupLocators.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupLocators.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupLocators.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupLocators.java Wed Jan  2 05:20:52 2013
@@ -37,6 +37,7 @@ import java.net.MalformedURLException;
 import java.rmi.RemoteException;
 import java.util.ArrayList;
 import com.sun.jini.qa.harness.AbstractServiceAdmin;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -68,7 +69,7 @@ public class RemoveLookupLocators extend
      */
     LookupLocator[] getTestLocatorSet() throws MalformedURLException {
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         return LocatorsUtil.getSubset(admin.getLocators());
     }
 
@@ -79,13 +80,13 @@ public class RemoveLookupLocators extend
      *  of locators that should be expected after removing a sub-set of
      *  locators.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         removeLocatorSet = getTestLocatorSet();
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         if (admin == null) {
-            return;
+            return this;
         }
         LookupLocator[] configLocators = admin.getLocators();
 
@@ -112,6 +113,7 @@ public class RemoveLookupLocators extend
                                            "expectedLocators",
 					   Level.FINE);
         }
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupLocatorsDups.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupLocatorsDups.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupLocatorsDups.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/RemoveLookupLocatorsDups.java Wed Jan  2 05:20:52 2013
@@ -42,7 +42,7 @@ public class RemoveLookupLocatorsDups ex
     LookupLocator[] getTestLocatorSet() throws MalformedURLException {
         /* First retrieve a sub-set of the initial locators */
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         LookupLocator[] subsetCurLocators = LocatorsUtil.getSubset(admin.getLocators());
         /* Next, use the above sub-set to construct a set with duplicates */
         return (LocatorsUtil.getLocatorsWithDups(subsetCurLocators));

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupGroups.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupGroups.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupGroups.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupGroups.java Wed Jan  2 05:20:52 2013
@@ -26,6 +26,7 @@ import com.sun.jini.test.share.GroupsUti
 import com.sun.jini.test.share.JoinAdminUtil;
 
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 import com.sun.jini.qa.harness.TestException;
 
 import net.jini.admin.JoinAdmin;
@@ -75,8 +76,8 @@ public class SetLookupGroups extends Abs
      *  of groups that should be expected after replacing the service's
      *  current group set with the new set of groups.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         newGroupSet = getTestGroupSet();
         expectedGroups = newGroupSet;
         if(expectedGroups != DiscoveryGroupManagement.ALL_GROUPS){
@@ -90,6 +91,7 @@ public class SetLookupGroups extends Abs
         } else {
             logger.log(Level.FINE, "expectedGroups = ALL_GROUPS");
         }
+        return this;
     }
 
     /** Executes the current test by doing the following:

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupGroupsDups.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupGroupsDups.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupGroupsDups.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupGroupsDups.java Wed Jan  2 05:20:52 2013
@@ -55,7 +55,7 @@ public class SetLookupGroupsDups extends
      */
     String[] getTestGroupSet() {
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         return GroupsUtil.getGroupsWithDups(admin.getGroups());
     }
 }

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupLocators.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupLocators.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupLocators.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupLocators.java Wed Jan  2 05:20:52 2013
@@ -27,6 +27,7 @@ import com.sun.jini.test.share.LocatorsU
 import com.sun.jini.test.share.JoinAdminUtil;
 
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 import com.sun.jini.qa.harness.TestException;
 
 import net.jini.admin.JoinAdmin;
@@ -80,8 +81,8 @@ public class SetLookupLocators extends A
      *  of locators that should be expected expected after replacing the
      *  service's current set of locators  with the new set of locators.
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         newLocatorSet = getTestLocatorSet();
         /* Construct the expected locators set */
         if(newLocatorSet == null) {
@@ -92,7 +93,8 @@ public class SetLookupLocators extends A
                                            "expectedLocators",
 					   Level.FINE);
         }
-    }//end setup
+        return this;
+    }//end construct
 
     /** Executes the current test by doing the following:
      *  

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupLocatorsDups.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupLocatorsDups.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupLocatorsDups.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/joinadmin/SetLookupLocatorsDups.java Wed Jan  2 05:20:52 2013
@@ -59,7 +59,7 @@ public class SetLookupLocatorsDups exten
      */
     LookupLocator[] getTestLocatorSet() throws MalformedURLException {
 	AbstractServiceAdmin admin = 
-	    (AbstractServiceAdmin) manager.getAdmin(discoverySrvc);
+	    (AbstractServiceAdmin) getManager().getAdmin(discoverySrvc);
         return (LocatorsUtil.getLocatorsWithDups(admin.getLocators()));
     }
 }

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/storageadmin/GetStorageLocation.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/storageadmin/GetStorageLocation.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/storageadmin/GetStorageLocation.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/fiddler/storageadmin/GetStorageLocation.java Wed Jan  2 05:20:52 2013
@@ -32,6 +32,7 @@ import net.jini.discovery.LookupDiscover
 
 import java.rmi.RemoteException;
 import com.sun.jini.qa.harness.AbstractServiceAdmin;
+import com.sun.jini.qa.harness.Test;
 
 /**
  * This class determines whether or not the lookup discovery service can
@@ -55,15 +56,16 @@ public class GetStorageLocation extends 
      *  tests's initial configuration, the location to which the service
      *  is expected to store its persistent state.
      */
-    public void setup(com.sun.jini.qa.harness.QAConfig sysConfig) throws Exception {
-        super.setup(sysConfig);
-        if (manager.getAdmin(discoverySrvc) == null) {
-	    return;
+    public Test construct(com.sun.jini.qa.harness.QAConfig sysConfig) throws Exception {
+        super.construct(sysConfig);
+        if (getManager().getAdmin(discoverySrvc) == null) {
+	    return this;
         }
-        expectedLocation = ((AbstractServiceAdmin) (manager.getAdmin(discoverySrvc))).getLogDir();
+        expectedLocation = ((AbstractServiceAdmin) (getManager().getAdmin(discoverySrvc))).getLogDir();
         logger.log(Level.FINE, ""
                           +": expectedLocation = "+expectedLocation);
-    }//end setup
+        return this;
+    }//end construct
 
     /** Executes the current test by doing the following:
      *  

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/AddAttributesRace.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/AddAttributesRace.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/AddAttributesRace.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/AddAttributesRace.java Wed Jan  2 05:20:52 2013
@@ -22,10 +22,12 @@ import java.util.logging.Level;
 
 import com.sun.jini.qa.harness.TestException;
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 
 import com.sun.jini.test.share.AttributesUtil;
 import com.sun.jini.test.share.DiscoveryServiceUtil;
 import com.sun.jini.test.spec.joinmanager.AbstractBaseTest;
+import java.util.List;
 
 import net.jini.discovery.LookupDiscoveryManager;
 import net.jini.lookup.JoinManager;
@@ -108,9 +110,9 @@ public class AddAttributesRace extends A
      *         services running within the same multicast radius of the new
      *         lookup services
      *    <li> creates a discovery manager that discovers the lookup service(s)
-     *         started during setup
+     *         started during construct
      *    <li> verifies the discovery of the lookup service(s) started during
-     *         setup
+     *         construct
      *    <li> initializes the initial set of attributes with which to
      *         register the service, the new set of attributes to add
      *         to the service through join manager, and the set of attributes
@@ -118,11 +120,12 @@ public class AddAttributesRace extends A
      *         service(s) started above
      *   </ul>
      */
-    public void setup(QAConfig config) throws Exception {
-        super.setup(config);
+    public Test construct(QAConfig config) throws Exception {
+        super.construct(config);
         /* Make sure lookups are discovered before creating join manager */
         logger.log(Level.FINE, "do lookup service discovery ...");
         ldm = getLookupDiscoveryManager();
+        List lookupsStarted = getLookupServices().getLookupsStarted();
         mainListener.setLookupsToDiscover(lookupsStarted,
                                           toGroupsArray(lookupsStarted));
         waitForDiscovery(mainListener);
@@ -138,7 +141,8 @@ public class AddAttributesRace extends A
         AttributesUtil.displayAttributeSet(expectedAttrs,
                                            "expected service attrs",
 					   Level.FINE);
-    }//end setup
+        return this;
+    }//end construct
 
     /** Executes the current test by doing the following:
      * <p><ul>

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.java Wed Jan  2 05:20:52 2013
@@ -22,7 +22,6 @@ import java.util.logging.Level;
 
 import com.sun.jini.qa.harness.QAConfig;
 import com.sun.jini.qa.harness.TestException;
-
 import com.sun.jini.test.spec.joinmanager.AbstractBaseTest;
 
 import net.jini.discovery.DiscoveryGroupManagement;
@@ -78,6 +77,7 @@ import com.sun.jini.start.SharedGroup;
 import com.sun.jini.config.Config;
 import com.sun.jini.config.ConfigUtil;
 import com.sun.jini.logging.Levels;
+import com.sun.jini.qa.harness.Test;
 
 import net.jini.activation.ActivationExporter;
 import net.jini.activation.ActivationGroup;
@@ -107,6 +107,7 @@ import java.rmi.activation.ActivationExc
 import java.rmi.MarshalledObject;
 import java.rmi.server.ExportException;
 import java.security.PrivilegedExceptionAction;
+import java.util.List;
 import java.util.StringTokenizer;
 
 import javax.security.auth.Subject;
@@ -234,10 +235,10 @@ public class LeaseRenewDurRFE extends Ab
      * service(s) as the TestService(s) just started, and which can be
      * accessed by the run() method.
      */
-    public void setup(QAConfig sysConfig) throws Exception {
-        super.setup(sysConfig);
+    public Test construct(QAConfig sysConfig) throws Exception {
+        super.construct(sysConfig);
         System.setProperty("com.sun.jini.qa.harness.runactivation", "true");
-        manager.startService("activationSystem");
+        getManager().startService("activationSystem");
         /* set shared convenience variables */
         host = sysConfig.getLocalHostName();
         jiniPort = sysConfig.getStringConfigVal("com.sun.jini.jsk.port",
@@ -280,6 +281,7 @@ public class LeaseRenewDurRFE extends Ab
         loggingFile = sysConfig.getStringConfigVal
                    ("java.util.logging.config.file","/vob/qa/src/qa1.logging");
         /* lookup discovery */
+        List lookupsStarted = getLookupServices().getLookupsStarted();
         LookupLocator[] locs = toLocatorArray(lookupsStarted);
         mainListener.setLookupsToDiscover(lookupsStarted, locs);
         ldm = getLookupDiscoveryManager(locs);
@@ -452,9 +454,10 @@ public class LeaseRenewDurRFE extends Ab
         /* create SDM to retrieve ref to TestService-i from lookup */
         sdm = new ServiceDiscoveryManager
                                     (ldm, null, sysConfig.getConfiguration());
-    }//end setup
+        return this;
+    }//end construct
 
-    /** For each separate TestService started during setup, do the following:
+    /** For each separate TestService started during construct, do the following:
      * <p><ul>
      *     <li> using a blocking lookup method on the service discovery
      *          manager, discover by service ID, the associated TestService;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/RaceAttrsVsTerminateISE.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/RaceAttrsVsTerminateISE.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/RaceAttrsVsTerminateISE.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/RaceAttrsVsTerminateISE.java Wed Jan  2 05:20:52 2013
@@ -19,8 +19,9 @@
 package com.sun.jini.test.impl.joinmanager;
 
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 import com.sun.jini.test.spec.joinmanager.AbstractBaseTest;
-
+import java.util.List;
 import net.jini.lookup.JoinManager;
 
 import java.util.logging.Level;
@@ -56,15 +57,16 @@ public class RaceAttrsVsTerminateISE ext
      *          lookup services started in the previous step
      *   </ul>
      */
-    public void setup(QAConfig sysConfig) throws Exception {
-        super.setup(sysConfig);
+    public Test construct(QAConfig sysConfig) throws Exception {
+        super.construct(sysConfig);
         newServiceAttrs =
                removeDups( addAttrsDup1DupAll(serviceAttrs,newServiceAttrs) );
         /* Discover & join lookups just started */
         jm = new JoinManager(testService,serviceAttrs,serviceID,
                              getLookupDiscoveryManager(),leaseMgr,
                              sysConfig.getConfiguration());
-    }//end setup
+        return this;
+    }//end construct
 
     /** Call one of the attribute mutator methods, delay N seconds, and then
      *  terminate the JoinManager to test for regression. Regression occurs
@@ -91,6 +93,7 @@ public class RaceAttrsVsTerminateISE ext
      */
     public void run() throws Exception {
         /* Verify all lookups are discovered */
+        List lookupsStarted = getLookupServices().getLookupsStarted();
         mainListener.setLookupsToDiscover(lookupsStarted,
                                           toGroupsArray(lookupsStarted));
         waitForDiscovery(mainListener);

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/RaceAttrsVsTerminateULE.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/RaceAttrsVsTerminateULE.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/RaceAttrsVsTerminateULE.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/RaceAttrsVsTerminateULE.java Wed Jan  2 05:20:52 2013
@@ -19,7 +19,9 @@
 package com.sun.jini.test.impl.joinmanager;
 
 import com.sun.jini.qa.harness.QAConfig;
+import com.sun.jini.qa.harness.Test;
 import com.sun.jini.test.spec.joinmanager.AbstractBaseTest;
+import java.util.List;
 
 import net.jini.lookup.JoinManager;
 
@@ -56,15 +58,16 @@ public class RaceAttrsVsTerminateULE ext
      *          lookup services started in the previous step
      *   </ul>
      */
-    public void setup(QAConfig sysConfig) throws Exception {
-        super.setup(sysConfig);
+    public Test construct(QAConfig sysConfig) throws Exception {
+        super.construct(sysConfig);
         newServiceAttrs =
                removeDups( addAttrsDup1DupAll(serviceAttrs,newServiceAttrs) );
         /* Discover & join lookups just started */
         jm = new JoinManager(testService,serviceAttrs,serviceID,
                              getLookupDiscoveryManager(),leaseMgr,
                              sysConfig.getConfiguration());
-    }//end setup
+        return this;
+    }//end construct
 
     /** Call one of the attribute mutator methods and then immediately
      *  terminate the JoinManager to test for regression. Regression occurs
@@ -94,6 +97,7 @@ public class RaceAttrsVsTerminateULE ext
      */
     public void run() throws Exception {
         /* Verify all lookups are discovered */
+        List<LocatorGroupsPair> lookupsStarted = getLookupServices().getLookupsStarted();
         mainListener.setLookupsToDiscover(lookupsStarted,
                                           toGroupsArray(lookupsStarted));
         waitForDiscovery(mainListener);