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 [35/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...
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheDiscard.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheDiscard.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheDiscard.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheDiscard.java Wed Jan 2 05:20:52 2013
@@ -23,6 +23,7 @@ import java.util.logging.Level;
import net.jini.core.lookup.ServiceItem;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* This class verifies that the <code>discard</code> method of the
@@ -42,12 +43,13 @@ public class CacheDiscard extends CacheL
* 4. Creates a template that will match the test services based on
* service type only
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "single service cache lookup and then discard -- "
+"services pre-registered, "
+"no first-stage filter, no second-stage filter";
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookup.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookup.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookup.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookup.java Wed Jan 2 05:20:52 2013
@@ -30,6 +30,7 @@ import net.jini.core.lookup.ServiceItem;
import java.rmi.RemoteException;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -66,21 +67,22 @@ public class CacheLookup extends Abstrac
* 4. Creates a template that will match the test services based on
* service type only
*/
- public void setup(QAConfig sysConfig) throws Exception {
- super.setup(sysConfig);
+ public Test construct(QAConfig sysConfig) throws Exception {
+ super.construct(sysConfig);
testDesc = "single service cache lookup -- services pre-registered, "
+"no first-stage filter, no second-stage filter";
- logger.log(Level.FINE, "registering "+nServices
- +" service(s) each with "+nAttributes
+ logger.log(Level.FINE, "registering "+getnServices()
+ +" service(s) each with "+getnAttributes()
+" attribute(s) ...");
- registerServices(nServices,nAttributes);
+ registerServices(getnServices(), getnAttributes());
cacheDelay = 20*1000;
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
* 1. Requests the creation of a lookup cache that will perform template
- * matching using the template created during setup, and which will
+ * matching using the template created during construct, and which will
* apply NO first-stage filtering to the results of the template
* matching (<code>null</code> filter parameter)
* 2. Invokes the desired version of the <code>lookup</code> method -
@@ -115,8 +117,8 @@ public class CacheLookup extends Abstrac
throw new TestException(" -- service component of "
+"returned service is null");
} else {
- for(int i=0;i<expectedServiceList.size();i++) {
- if((srvcItem.service).equals(expectedServiceList.get(i))) {
+ for(int i=0;i<getExpectedServiceList().size();i++) {
+ if((srvcItem.service).equals(getExpectedServiceList().get(i))) {
return;// passed
}//endif
}//end loop (i)
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupFilterFilter.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupFilterFilter.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupFilterFilter.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupFilterFilter.java Wed Jan 2 05:20:52 2013
@@ -25,6 +25,7 @@ import net.jini.lookup.ServiceItemFilter
import net.jini.core.lookup.ServiceItem;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -76,16 +77,17 @@ public class CacheLookupFilterFilter ext
* template matching performed by the lookup cache (first-stage
* filtering)
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "single service cache lookup -- services pre-registered, "
+"first-stage filter, second-stage filter";
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
* 1. Requests the creation of a lookup cache that will perform template
- * matching using the template created during setup, and which will
+ * matching using the template created during construct, and which will
* apply the first-stage filter to the results of the template
* matching
* 2. Invokes the desired version of the <code>lookup</code> method -
@@ -136,8 +138,8 @@ public class CacheLookupFilterFilter ext
+"returned service is null");
} else {
boolean srvcOK = false;
- for(int i=0;i<expectedServiceList.size();i++) {
- if((srvcItem.service).equals(expectedServiceList.get(i))) {
+ for(int i=0;i<getExpectedServiceList().size();i++) {
+ if((srvcItem.service).equals(getExpectedServiceList().get(i))) {
srvcOK = true;
break;
}//endif
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupFilterNoFilter.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupFilterNoFilter.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupFilterNoFilter.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupFilterNoFilter.java Wed Jan 2 05:20:52 2013
@@ -21,6 +21,7 @@ package com.sun.jini.test.spec.servicedi
import net.jini.lookup.ServiceItemFilter;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -65,16 +66,17 @@ public class CacheLookupFilterNoFilter e
* template matching performed by the lookup cache (first-stage
* filtering)
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "single service cache lookup -- services pre-registered, "
+"first-stage filter, no second-stage filter";
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
* 1. Requests the creation of a lookup cache that will perform template
- * matching using the template created during setup, and which will
+ * matching using the template created during construct, and which will
* apply the first-stage filter to the results of the template
* matching
* 2. Invokes the desired version of the <code>lookup</code> method -
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupNoFilterFilter.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupNoFilterFilter.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupNoFilterFilter.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/cache/CacheLookupNoFilterFilter.java Wed Jan 2 05:20:52 2013
@@ -21,6 +21,7 @@ package com.sun.jini.test.spec.servicedi
import net.jini.lookup.ServiceItemFilter;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -60,16 +61,17 @@ public class CacheLookupNoFilterFilter e
* 4. Creates a template that will match the test services based on
* service type only
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "single service cache lookup -- services pre-registered, "
+"no first-stage filter, second-stage filter";
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
* 1. Requests the creation of a lookup cache that will perform template
- * matching using the template created during setup, and which will
+ * matching using the template created during construct, and which will
* apply NO first-stage filtering to the results of the template
* matching (<code>null</code> filter parameter)
* 2. Invokes the desired version of the <code>lookup</code> method -
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Discovery.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Discovery.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Discovery.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Discovery.java Wed Jan 2 05:20:52 2013
@@ -30,7 +30,7 @@ import java.rmi.activation.ActivationExc
// Test harness imports
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
// jini packages
import net.jini.admin.Administrable;
@@ -39,12 +39,13 @@ import net.jini.discovery.DiscoveryListe
import net.jini.discovery.DiscoveryGroupManagement;
import net.jini.discovery.LookupDiscovery;
import com.sun.jini.admin.DestroyAdmin;
+import com.sun.jini.qa.harness.Test;
import com.sun.jini.start.ServiceStarter;
import net.jini.lookup.DiscoveryAdmin;
import net.jini.core.lookup.ServiceRegistrar;
import net.jini.core.lookup.ServiceID;
-public class Discovery extends QATest {
+public class Discovery extends QATestEnvironment implements Test {
private class Ignorer implements DiscoveryListener {
@@ -211,7 +212,7 @@ public class Discovery extends QATest {
// Create an instance of the lookup service.
logger.log(Level.INFO, "creating lookup service");
- return manager.startLookupService();
+ return getManager().startLookupService();
}
protected DiscoveryAdmin getAdmin(ServiceRegistrar r)
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Locator.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Locator.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Locator.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Locator.java Wed Jan 2 05:20:52 2013
@@ -27,7 +27,7 @@ import java.rmi.RemoteException;
// Test harness packages
import com.sun.jini.qa.harness.TestException;
import com.sun.jini.qa.harness.QAConfig;
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
// net.jini
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/MulticastAnnouncement.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/MulticastAnnouncement.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/MulticastAnnouncement.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/MulticastAnnouncement.java Wed Jan 2 05:20:52 2013
@@ -30,17 +30,18 @@ import java.util.Vector;
// Test harness packages
import com.sun.jini.qa.harness.TestException;
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
// net.jini
+import com.sun.jini.qa.harness.Test;
import net.jini.discovery.IncomingMulticastAnnouncement;
import net.jini.core.discovery.LookupLocator;
import net.jini.discovery.OutgoingMulticastAnnouncement;
import net.jini.core.lookup.ServiceID;
-public class MulticastAnnouncement extends QATest {
+public class MulticastAnnouncement extends QATestEnvironment implements Test {
private static String makeGroup(int length) {
StringBuffer buf = new StringBuffer(length);
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/MulticastRequest.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/MulticastRequest.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/MulticastRequest.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/MulticastRequest.java Wed Jan 2 05:20:52 2013
@@ -30,15 +30,16 @@ import java.util.Vector;
// Test harness imports
import com.sun.jini.qa.harness.TestException;
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
// net.jini
+import com.sun.jini.qa.harness.Test;
import net.jini.discovery.OutgoingMulticastRequest;
import net.jini.discovery.IncomingMulticastRequest;
import net.jini.core.lookup.ServiceID;
-public class MulticastRequest extends QATest {
+public class MulticastRequest extends QATestEnvironment implements Test {
private static String makeGroup(int length) {
StringBuffer buf = new StringBuffer(length);
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Permission.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Permission.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Permission.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/discovery/Permission.java Wed Jan 2 05:20:52 2013
@@ -20,11 +20,12 @@ package com.sun.jini.test.spec.servicedi
import java.util.logging.Level;
import com.sun.jini.qa.harness.QAConfig;
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
+import com.sun.jini.qa.harness.Test;
import net.jini.discovery.DiscoveryPermission;
import java.security.PermissionCollection;
-public class Permission extends QATest {
+public class Permission extends QATestEnvironment implements Test {
public void run() throws Exception {
check("foo", "foo", true);
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/event/ModifyAttrServiceChanged.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/event/ModifyAttrServiceChanged.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/event/ModifyAttrServiceChanged.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/event/ModifyAttrServiceChanged.java Wed Jan 2 05:20:52 2013
@@ -40,7 +40,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
-
+import com.sun.jini.qa.harness.Test;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
@@ -76,11 +76,11 @@ public class ModifyAttrServiceChanged ex
* 3. Creates a template that will match the test services based on
* service type only
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "change set of service attribute(s) -- "
+"expect service changed event(s)";
- nAddedExpected = nServices;
+ nAddedExpected = getnServices();
nChangedExpected = nAddedExpected;
testServiceType = AbstractBaseTest.TEST_SERVICE;
@@ -96,7 +96,8 @@ public class ModifyAttrServiceChanged ex
cacheDelay = 60*1000;
eventDelay = 60*1000;
}//endif
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
@@ -213,7 +214,7 @@ public class ModifyAttrServiceChanged ex
*/
for(Iterator itr = eSet.iterator(); itr.hasNext(); ) {
/* Retrieve the (key,value) pair from the set of mappings
- * that was populated during setup. The key is the test
+ * that was populated during construct. The key is the test
* service that was registered with the lookup service(s).
* The value is an ArrayList contain a set of data structures
* of type AbstractBaseTest.RegInfo, containing information
@@ -324,12 +325,12 @@ public class ModifyAttrServiceChanged ex
/** This method registers the configured number of test service(s) with
* the configured number of lookup service(s) that were started during
- * setup. Additionally, for each lookup service with which a given
+ * construct. Additionally, for each lookup service with which a given
* service is registered, this method associates the configured number
* of test attributes. After registration is complete, this method
* verifies that each registration was successful by performing a
* blocking lookup on the service discovery manager created during
- * setup.
+ * construct.
*
* To verify the success of each registration, a template reflecting
* both the class type of the registered service(s) and the exact,
@@ -346,18 +347,18 @@ public class ModifyAttrServiceChanged ex
* display the value returned by this method.
*/
protected void registerAndVerify(long waitDur) throws Exception {
- if(nServices <= 0) throw new TestException
+ if(getnServices() <= 0) throw new TestException
("no service(s) registered -- check the configuration file");
- if(nAttributes != 1) throw new TestException
+ if(getnAttributes() != 1) throw new TestException
("# of attributes registered with "
- +"each service ("+nAttributes+") != 1 "
+ +"each service ("+getnAttributes()+") != 1 "
+"-- check the configuration file");
/* Register each test service and its corresponding attribute. */
- registerServices(0,nServices,nAttributes,testServiceType);
+ registerServices(0, getnServices(), getnAttributes(),testServiceType);
String testServiceClassname
= "com.sun.jini.test.spec.servicediscovery.AbstractBaseTest$TestService";
- TestService[] expectedService = new TestService[nServices];
- ServiceTemplate[] lookupTmpl = new ServiceTemplate[nServices];
+ TestService[] expectedService = new TestService[getnServices()];
+ ServiceTemplate[] lookupTmpl = new ServiceTemplate[getnServices()];
for(int i=0;i<expectedService.length;i++) {
int val = SERVICE_BASE_VALUE+i;
expectedService[i] = new TestService(val);
@@ -419,7 +420,7 @@ public class ModifyAttrServiceChanged ex
/* template does exact match on attribute value, using a
* less restrictive template could return any service
*/
- for(int j=0;j<expectedServiceList.size();j++) {
+ for(int j=0;j<getExpectedServiceList().size();j++) {
if( (srvcItem.service).equals(expectedService[i]) ) {
logger.log(Level.FINE, "expected "
+"service found -- requested "
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/Lookup.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/Lookup.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/Lookup.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/Lookup.java Wed Jan 2 05:20:52 2013
@@ -28,6 +28,8 @@ import net.jini.core.lookup.ServiceItem;
import java.util.ArrayList;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
+import java.util.List;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -58,14 +60,15 @@ public class Lookup extends AbstractBase
* 4. Creates a template that will match the test services based on
* service type only
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "single service lookup employing -- template";
- logger.log(Level.FINE, "registering "+nServices
- +" service(s) each with "+nAttributes
+ logger.log(Level.FINE, "registering "+getnServices()
+ +" service(s) each with "+getnAttributes()
+" attribute(s) ...");
- registerServices(nServices,nAttributes);
- }//end setup
+ registerServices(getnServices(), getnAttributes());
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
@@ -87,12 +90,12 @@ public class Lookup extends AbstractBase
throw new TestException(" -- service component of "
+"returned service is null");
} else {
- for(int i=0;i<expectedServiceList.size();i++) {
- if((srvcItem.service).equals(expectedServiceList.get(i))) {
+ for(int i=0;i<getExpectedServiceList().size();i++) {
+ if((srvcItem.service).equals(getExpectedServiceList().get(i))) {
return;//passed
}//endif
}//end loop (i)
- displaySrvcInfoOnFailure(srvcItem,expectedServiceList);
+ displaySrvcInfoOnFailure(srvcItem, getExpectedServiceList());
throw new TestException(" -- returned service item "
+" is not equivalent to any of the "
+"service(s) registered with lookup");
@@ -101,11 +104,11 @@ public class Lookup extends AbstractBase
/** Convenience method that should be called when failure occurs. This
* method displays useful debug information about the given
- * <code>ServiceItem</code> in relation to the <code>ArrayList</code>
+ * <code>ServiceItem</code> in relation to the <code>List</code>
* containing the registered services.
*/
protected void displaySrvcInfoOnFailure(ServiceItem srvcItem,
- ArrayList srvcList)
+ List srvcList)
{
logger.log(Level.FINE, "returned service item "
+" is not equivalent to any of the "
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupFilter.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupFilter.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupFilter.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupFilter.java Wed Jan 2 05:20:52 2013
@@ -27,6 +27,7 @@ import net.jini.core.lookup.ServiceItem;
import net.jini.core.lookup.ServiceTemplate;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -68,10 +69,11 @@ public class LookupFilter extends Lookup
* registered above; and which will be applied to the results of the
* template matching performed by the service discovery manager
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "single service lookup employing -- template, filter";
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
@@ -87,7 +89,7 @@ public class LookupFilter extends Lookup
*
* 1. Invokes the desired version of the <code>lookup</code> method
* on the service discovery manager - applying the filter created
- * during setup - to query the discovered lookup services for the
+ * during construct - to query the discovered lookup services for the
* desired service.
* 2. Verifies that the service returned is the service expected
*/
@@ -105,10 +107,10 @@ public class LookupFilter extends Lookup
* to reflect how the lookup will be performed. Furthermore, the
* contents must be adjusted on a service-by-service basis.
*/
- for(int i=0;i<expectedServiceList.size();i++) {
+ for(int i=0;i<getExpectedServiceList().size();i++) {
logger.log(Level.FINE, "test service "+i);
TestService expectedService
- = (TestService)expectedServiceList.get(i);
+ = (TestService)getExpectedServiceList().get(i);
if( srvcValOdd(expectedService) ) {
expectedService = null;
logger.log(Level.FINE, " expect null on lookup");
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMax.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMax.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMax.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMax.java Wed Jan 2 05:20:52 2013
@@ -23,6 +23,7 @@ import java.util.logging.Level;
import net.jini.core.lookup.ServiceItem;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -55,10 +56,11 @@ public class LookupMax extends Lookup {
* 4. Creates a template that will match the test services based on
* service type only
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "multiple service lookup employing -- template";
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
@@ -72,17 +74,16 @@ public class LookupMax extends Lookup {
/* Through the service discovery manager, query the discovered lookup
* service(s) for the desired services
*/
- ServiceItem[] srvcItems = srvcDiscoveryMgr.lookup(template,
- nServices,
+ ServiceItem[] srvcItems = srvcDiscoveryMgr.lookup(template, getnServices(),
firstStageFilter);
if(srvcItems == null) {
throw new TestException
(" -- array of service items returned is null");
- } else if( srvcItems.length != expectedServiceList.size() ) {
+ } else if( srvcItems.length != getExpectedServiceList().size() ) {
logger.log(Level.FINE, "number of service items "
+"returned ("+srvcItems.length+") != "
+"expected number of service items ("
- +expectedServiceList.size()+")");
+ +getExpectedServiceList().size()+")");
for(int i=0;i<srvcItems.length;i++) {
logger.log(Level.FINE, " service["+i+"] = "
+srvcItems[i].service);
@@ -90,7 +91,7 @@ public class LookupMax extends Lookup {
throw new TestException(" -- number of service items returned ("
+srvcItems.length+") != expected number "
+"of service items ("
- +expectedServiceList.size()+")");
+ +getExpectedServiceList().size()+")");
} else {/* Compare the returned array to set of expected services */
label_i:
for(int i=0;i<srvcItems.length;i++) {
@@ -103,9 +104,9 @@ public class LookupMax extends Lookup {
+"returned service item "+i
+" is null");
} else {
- for(int j=0;j<expectedServiceList.size();j++) {
+ for(int j=0;j<getExpectedServiceList().size();j++) {
if( (srvcItems[i].service).equals
- (expectedServiceList.get(j)) )
+ (getExpectedServiceList().get(j)) )
{
continue label_i; // next srvcItems[i]
}//endif
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMaxFilter.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMaxFilter.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMaxFilter.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMaxFilter.java Wed Jan 2 05:20:52 2013
@@ -23,6 +23,7 @@ import java.util.logging.Level;
import net.jini.lookup.ServiceItemFilter;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -66,22 +67,23 @@ public class LookupMaxFilter extends Loo
* registered above; and which will be applied to the results of the
* template matching performed by the service discovery manager
*/
- public void setup(QAConfig sysConfig) throws Exception {
- super.setup(sysConfig);
+ public Test construct(QAConfig sysConfig) throws Exception {
+ super.construct(sysConfig);
testDesc = "multiple service lookup employing -- template, filter";
/* Construct the list of expected services based on how the filter
* is expected to function
*/
logger.log(Level.FINE,
"constructing the list of expected services ...");
- for(int i=0,indx=0,len=expectedServiceList.size();i<len;i++) {
- if(srvcValOdd((TestService)expectedServiceList.get(indx))){
- expectedServiceList.remove(indx);
+ for(int i=0,indx=0,len=getExpectedServiceList().size();i<len;i++) {
+ if(srvcValOdd((TestService)getExpectedServiceList().get(indx))){
+ getExpectedServiceList().remove(indx);
} else {
indx++;
}//endif
}//end loop
- }//end setup
+ return this;
+ }//end construct
}//end class LookupMaxFilter
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinEqualsMax.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinEqualsMax.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinEqualsMax.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinEqualsMax.java Wed Jan 2 05:20:52 2013
@@ -30,6 +30,7 @@ import java.rmi.RemoteException;
import java.util.ArrayList;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -70,14 +71,15 @@ public class LookupMinEqualsMax extends
* 4. Creates a template that will match the test services based on
* service type only
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = ": multiple service lookup employing -- template, "
+"blocking, minMatches = maxMatches";
- registerServices(nServices,nAttributes);
- maxMatches = nServices+nAddServices-1;
+ registerServices(getnServices(), getnAttributes());
+ maxMatches = getnServices()+getnAddServices()-1;
minMatches = maxMatches;
- }//end setup
+ return this;
+ }//end construct
/** Cleans up all state. */
public void tearDown() {
@@ -115,7 +117,7 @@ public class LookupMinEqualsMax extends
* returned.
*/
waitDur = 1*60*1000; //reset the amount of time to block
- verifyBlocking(nServices,nAddServices,waitDur);
+ verifyBlocking(getnServices(), getnAddServices(),waitDur);
}//end applyTestDef
/** Tests that the blocking mechanism of the lookup() method will block
@@ -150,14 +152,14 @@ public class LookupMinEqualsMax extends
+maxMatches+" service(s) -- blocking "
+waitDurSecs+" second(s)");
/* Register all services after waiting less than the block time */
- logger.log(Level.FINE, ""+": "+expectedServiceList.size()
+ logger.log(Level.FINE, ""+": "+getExpectedServiceList().size()
+" service(s) "
+"registered, registering "+nSrvcs
+" more service(s) ...");
(new RegisterThread(startVal,nSrvcs,0,waitDur)).start();
} else {//(nSrvcs<=0)
/* Will register no more services */
- logger.log(Level.FINE, ""+": "+expectedServiceList.size()
+ logger.log(Level.FINE, ""+": "+getExpectedServiceList().size()
+" service(s) "
+"registered, look up at least "
+minMatches+" service(s), but no more than "
@@ -179,9 +181,9 @@ public class LookupMinEqualsMax extends
DiscoveryServiceUtil.delayMS(regCompletionDelay);
/* populate the expected info after lookup to prevent delay */
ArrayList expectedSrvcs
- = new ArrayList(expectedServiceList.size());
- for(int i=0;i<expectedServiceList.size();i++) {
- expectedSrvcs.add(expectedServiceList.get(i));
+ = new ArrayList(getExpectedServiceList().size());
+ for(int i=0;i<getExpectedServiceList().size();i++) {
+ expectedSrvcs.add(getExpectedServiceList().get(i));
}//end loop
/* Modify the list based on whether or not a filter exists */
if( (firstStageFilter != null)
@@ -225,7 +227,7 @@ public class LookupMinEqualsMax extends
* Below, determine the number of services to expect based on
* the specified behavior described above.
*/
- int nPreReg = countSrvcsByVal(nServices);
+ int nPreReg = countSrvcsByVal(getnServices());
int nPostReg = expectedSrvcs.size();
int nExpectedSrvcs = nPreReg;
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinEqualsMaxFilter.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinEqualsMaxFilter.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinEqualsMaxFilter.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinEqualsMaxFilter.java Wed Jan 2 05:20:52 2013
@@ -21,6 +21,7 @@ package com.sun.jini.test.spec.servicedi
import net.jini.lookup.ServiceItemFilter;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -68,8 +69,8 @@ public class LookupMinEqualsMaxFilter ex
* registered above; and which will be applied to the results of the
* template matching performed by the service discovery manager
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "multiple service lookup employing -- template, filter, "
+"blocking, minMatches = maxMatches";
int nEvenSrvcs = 0;
@@ -78,7 +79,8 @@ public class LookupMinEqualsMaxFilter ex
}
maxMatches = nEvenSrvcs;
minMatches = maxMatches;
- }//end setup
+ return this;
+ }//end construct
}//end class LookupMinEqualsMaxFilter
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinLessMax.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinLessMax.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinLessMax.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinLessMax.java Wed Jan 2 05:20:52 2013
@@ -21,6 +21,7 @@ package com.sun.jini.test.spec.servicedi
import java.util.logging.Level;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -57,11 +58,11 @@ public class LookupMinLessMax extends Lo
* 4. Creates a template that will match the test services based on
* service type only
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "multiple service lookup employing -- template, "
+"blocking, minMatches < maxMatches";
- if(nAddServices <= 2) {
+ if(getnAddServices() <= 2) {
logger.log(Level.FINE,
"This test guarantees that the minimum "
+"number of services to");
@@ -73,16 +74,17 @@ public class LookupMinLessMax extends Lo
+"services to add must be > 2.");
logger.log(Level.FINE,
"The currently configured number of services "
- +"to add = "+nAddServices+".");
+ +"to add = "+getnAddServices()+".");
logger.log(Level.FINE, "Reset that number to 3.");
- nAddServices = 3;
+ getLookupServices().setnAddServices(3);
logger.log(Level.FINE,
"additional services to register -- "
- +nAddServices);
+ +getnAddServices());
}//endif
- maxMatches = nServices+nAddServices-1;
- minMatches = nServices+1;
- }//end setup
+ maxMatches = getnServices()+getnAddServices()-1;
+ minMatches = getnServices()+1;
+ return this;
+ }//end construct
}//end class LookupMinLessMax
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinLessMaxFilter.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinLessMaxFilter.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinLessMaxFilter.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinLessMaxFilter.java Wed Jan 2 05:20:52 2013
@@ -21,6 +21,7 @@ package com.sun.jini.test.spec.servicedi
import net.jini.lookup.ServiceItemFilter;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -67,14 +68,15 @@ public class LookupMinLessMaxFilter exte
* registered above; and which will be applied to the results of the
* template matching performed by the service discovery manager
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "multiple service lookup employing -- template, filter, "
+"blocking, minMatches < maxMatches";
maxMatches = countSrvcsByVal(maxMatches);
minMatches = countSrvcsByVal(minMatches);
if((minMatches+1) < maxMatches) minMatches = minMatches+1;
- }//end setup
+ return this;
+ }//end construct
}//end class LookupMinLessMaxFilter
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinMaxNoBlock.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinMaxNoBlock.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinMaxNoBlock.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinMaxNoBlock.java Wed Jan 2 05:20:52 2013
@@ -19,6 +19,7 @@
package com.sun.jini.test.spec.servicediscovery.lookup;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -60,13 +61,14 @@ public class LookupMinMaxNoBlock extends
* 4. Creates a template that will match the test services based on
* service type only
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "multiple service lookup employing -- template, "
+"blocking, more than minMatches available, should "
+"return without blocking";
minMatches = 1;//guarantee acceptable # is less than # available
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinMaxNoBlockFilter.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinMaxNoBlockFilter.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinMaxNoBlockFilter.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupMinMaxNoBlockFilter.java Wed Jan 2 05:20:52 2013
@@ -21,6 +21,7 @@ package com.sun.jini.test.spec.servicedi
import net.jini.lookup.ServiceItemFilter;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -74,8 +75,8 @@ public class LookupMinMaxNoBlockFilter e
* registered above; and which will be applied to the results of the
* template matching performed by the service discovery manager
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "multiple service lookup employing -- template, filter, "
+"blocking, more than minMatches available, should "
+"return without blocking";
@@ -84,7 +85,8 @@ public class LookupMinMaxNoBlockFilter e
if( (i%2) == 0 ) nEven++;
}
maxMatches = nEven;
- }//end setup
+ return this;
+ }//end construct
}//end class LookupMinMaxNoBlockFilter
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWait.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWait.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWait.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWait.java Wed Jan 2 05:20:52 2013
@@ -33,6 +33,7 @@ import net.jini.core.lookup.ServiceTempl
import java.rmi.RemoteException;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -64,10 +65,11 @@ public class LookupWait extends Abstract
* 2. Creates a service discovery manager that discovers the lookup
* services started above
*/
- 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);
testDesc = "single service lookup employing -- template, blocking";
- }//end setup
+ return this;
+ }//end construct
/** Cleans up all state. */
public void tearDown() {
@@ -91,10 +93,10 @@ public class LookupWait extends Abstract
* on the service discovery manager - applying NO filtering
* (<code>null</code> filter parameter) - and verifies that when
* no services are registered with the lookup services started during
- * setup, the blocking mechanism of the <code>lookup</code>
+ * construct, the blocking mechanism of the <code>lookup</code>
* method blocks for the full amount of time requested
* 2. Registers 1 service with each of the lookup services started
- * in setup
+ * in construct
* 3. Again invokes the desired version of the <code>lookup</code>
* method - applying NO filtering - and verifies that the service
* returned is the service expected, and the <code>lookup</code>
@@ -224,9 +226,9 @@ public class LookupWait extends Abstract
} else {
if(nAttrs > 0) {
/* less restrictive tmpl could return any service */
- for(int j=0;j<expectedServiceList.size();j++) {
+ for(int j=0;j<getExpectedServiceList().size();j++) {
if((srvcItem.service).equals
- (expectedServiceList.get(j)))
+ (getExpectedServiceList().get(j)))
{
logger.log(Level.FINE, "expected "
+"service found -- requested "
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWaitFilter.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWaitFilter.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWaitFilter.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWaitFilter.java Wed Jan 2 05:20:52 2013
@@ -21,6 +21,7 @@ package com.sun.jini.test.spec.servicedi
import net.jini.lookup.ServiceItemFilter;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -58,28 +59,29 @@ public class LookupWaitFilter extends Lo
* 2. Creates a service discovery manager that discovers the lookup
* services started above
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = ": single service lookup employing -- template, filter, "
+"blocking";
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
* 1. Invokes the desired version of the <code>lookup</code> method
* on the service discovery manager - applying the filter created
- * during setup - and verifies that when no services are registered
- * with the lookup services started during setup, the blocking
+ * during construct - and verifies that when no services are registered
+ * with the lookup services started during construct, the blocking
* mechanism of the <code>lookup</code> method blocks for the full
* amount of time requested
- * 2. With each of the lookup services started in setup, registers 3
+ * 2. With each of the lookup services started in construct, registers 3
* services each with 1 associated attribute
* 3. Again invokes the desired version of the <code>lookup</code>
* method - applying the filter - and verifies that the service
* returned is the service expected, and the <code>lookup</code>
* method blocks until the registration of the desired services
* have completed successfully
- * 4. With each of the lookup services started in setup, registers 4
+ * 4. With each of the lookup services started in construct, registers 4
* more services each with 1 associated attribute
* 5. Again invokes the desired version of the <code>lookup</code>
* method - applying the filter - and verifies that because the filter
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWaitNoBlock.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWaitNoBlock.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWaitNoBlock.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/servicediscovery/lookup/LookupWaitNoBlock.java Wed Jan 2 05:20:52 2013
@@ -25,6 +25,7 @@ import net.jini.core.lookup.ServiceItem;
import java.rmi.RemoteException;
import com.sun.jini.qa.harness.QAConfig;
import com.sun.jini.qa.harness.TestException;
+import com.sun.jini.qa.harness.Test;
/**
* With respect to the <code>lookup</code> method defined by the
@@ -72,10 +73,11 @@ public class LookupWaitNoBlock extends L
* 4. Creates a template that will match the test services based on
* service type only
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
testDesc = "single service lookup employing -- template, blocking";
- }//end setup
+ return this;
+ }//end construct
/** Defines the actual steps of this particular test.
*
@@ -93,7 +95,7 @@ public class LookupWaitNoBlock extends L
//XXX change from 2 to 20 to tolerate latencies when running secure
long maxActualBlock = 20*1000;//immediate return = no greater than 2 sec
//to account for network delays
- logger.log(Level.FINE, ""+expectedServiceList.size()
+ logger.log(Level.FINE, ""+getExpectedServiceList().size()
+" service(s) "
+"registered, look up exactly 1 service "
+"-- blocking "+waitDurSecs+" second(s)");
@@ -116,14 +118,14 @@ public class LookupWaitNoBlock extends L
+"returned service is null");
} else {
boolean srvcOK = false;
- for(int i=0;i<expectedServiceList.size();i++) {
- if((srvcItem.service).equals(expectedServiceList.get(i))) {
+ for(int i=0;i<getExpectedServiceList().size();i++) {
+ if((srvcItem.service).equals(getExpectedServiceList().get(i))) {
srvcOK = true;
break;
}//endif
}//end loop (i)
if(!srvcOK) {
- displaySrvcInfoOnFailure(srvcItem,expectedServiceList);
+ displaySrvcInfoOnFailure(srvcItem, getExpectedServiceList());
throw new TestException(" -- returned service item is not "
+"equivalent to any expected service");
}//endif
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/file/integrity/ProvidesIntegrity.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/file/integrity/ProvidesIntegrity.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/file/integrity/ProvidesIntegrity.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/file/integrity/ProvidesIntegrity.java Wed Jan 2 05:20:52 2013
@@ -19,7 +19,7 @@ package com.sun.jini.test.spec.url.file.
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
-
+import com.sun.jini.qa.harness.Test;
// java.util
import java.util.logging.Level;
@@ -409,7 +409,7 @@ public class ProvidesIntegrity extends A
* - expected result (boolean value or Exception class).
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
+ public Test construct(QAConfig config) throws Exception {
/* Creating TestItem objects */
for (int i = 0; i < tc_prot.length; i++) {
items.add(i, new TestItem("TestCase" + (i + 1),
@@ -418,6 +418,7 @@ public class ProvidesIntegrity extends A
tc_file[i],
tc_expected[i]));
}
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/AbstractSameFile.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/AbstractSameFile.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/AbstractSameFile.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/AbstractSameFile.java Wed Jan 2 05:20:52 2013
@@ -20,11 +20,12 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
+import com.sun.jini.qa.harness.Test;
import com.sun.jini.qa.harness.TestException;
// java.util
@@ -43,7 +44,7 @@ import java.net.MalformedURLException;
* This is an abstract class that is extended by
* {@link Equals} and {@link SameFile} tests.
*/
-public abstract class AbstractSameFile extends QATest {
+public abstract class AbstractSameFile extends QATestEnvironment implements Test {
QAConfig config;
/**
@@ -78,8 +79,8 @@ public abstract class AbstractSameFile e
* - creating TestItem object for each Test Case name.
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
/*
@@ -91,6 +92,7 @@ public abstract class AbstractSameFile e
for (int i = 0; i < tc_names.length; i++) {
items.add(i, new TestItem(tc_names[i]));
}
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/GetDefaultPort.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/GetDefaultPort.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/GetDefaultPort.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/GetDefaultPort.java Wed Jan 2 05:20:52 2013
@@ -20,9 +20,9 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
import com.sun.jini.qa.harness.TestException;
@@ -96,7 +96,7 @@ import java.net.URL;
*
* </pre>
*/
-public class GetDefaultPort extends QATest {
+public class GetDefaultPort extends QATestEnvironment implements Test {
QAConfig config;
/** HTTPMD URL object */
@@ -125,8 +125,8 @@ public class GetDefaultPort extends QATe
* <TestCaseName>.Port - port number of HTTPMD URL object
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
/* Getting test parameters */
@@ -138,6 +138,7 @@ public class GetDefaultPort extends QATe
new Integer(config.getIntConfigVal(testCases[i] + ".Port",
- 1)));
}
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/HashCode.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/HashCode.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/HashCode.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/HashCode.java Wed Jan 2 05:20:52 2013
@@ -20,9 +20,9 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
import com.sun.jini.qa.harness.TestException;
@@ -96,7 +96,7 @@ import com.sun.jini.test.spec.url.httpmd
*
* </pre>
*/
-public class HashCode extends QATest {
+public class HashCode extends QATestEnvironment implements Test {
QAConfig config;
/**
@@ -142,8 +142,8 @@ public class HashCode extends QATest {
* <TestCaseName>.Url2 - String representation of 2-nd HTTPMD URL object
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
/*
@@ -158,6 +158,7 @@ public class HashCode extends QATest {
/* Creating TestHandler object */
handler = new TestHandler();
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/OpenConnection.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/OpenConnection.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/OpenConnection.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/OpenConnection.java Wed Jan 2 05:20:52 2013
@@ -20,9 +20,9 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
import com.sun.jini.qa.harness.TestException;
@@ -108,7 +108,7 @@ import com.sun.jini.test.spec.url.httpmd
*
* </pre>
*/
-public class OpenConnection extends QATest {
+public class OpenConnection extends QATestEnvironment implements Test {
QAConfig config;
final static int BUFSIZE = 8;
@@ -165,8 +165,8 @@ public class OpenConnection extends QATe
* testClassServer.port - HTTP Server port number
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
/*
@@ -223,6 +223,7 @@ public class OpenConnection extends QATe
getFileContents(classServerSrcDir + absfn);
expectedResult = expectedFileContents;
}
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/ParseURL.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/ParseURL.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/ParseURL.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/handler/ParseURL.java Wed Jan 2 05:20:52 2013
@@ -20,9 +20,9 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
import com.sun.jini.qa.harness.TestException;
@@ -250,7 +250,7 @@ import java.net.URL;
*
* </pre>
*/
-public class ParseURL extends QATest {
+public class ParseURL extends QATestEnvironment implements Test {
QAConfig config;
/**
@@ -297,8 +297,8 @@ public class ParseURL extends QATest {
* String representation)
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
/* Getting test parameters and creating TestItem objects */
@@ -307,6 +307,7 @@ public class ParseURL extends QATest {
for (int i = 0; i < tc_names.length; i++) {
items.add(i, new TestItem(tc_names[i]));
}
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigest.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigest.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigest.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigest.java Wed Jan 2 05:20:52 2013
@@ -20,9 +20,9 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
import com.sun.jini.qa.harness.TestException;
@@ -157,7 +157,7 @@ import java.security.NoSuchAlgorithmExce
*
* </pre>
*/
-public class ComputeDigest extends QATest {
+public class ComputeDigest extends QATestEnvironment implements Test {
QAConfig config;
/**
@@ -210,8 +210,8 @@ public class ComputeDigest extends QATes
* directory
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
/* Creating an empty file (will be deleted when VM exits) */
@@ -236,7 +236,7 @@ public class ComputeDigest extends QATes
nonempty_file.deleteOnExit();
/* Launching 2-nd HTTP Server */
- manager.startService("ComputeDigest.SecondHTTPServer");
+ getManager().startService("ComputeDigest.SecondHTTPServer");
/* Getting test parameters and creating TestItem objects */
String[] tc_names = getTestCaseNames();
@@ -244,6 +244,7 @@ public class ComputeDigest extends QATes
for (int i = 0; i < tc_names.length; i++) {
items.add(i, new TestItem(tc_names[i]));
}
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigest2Urls.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigest2Urls.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigest2Urls.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigest2Urls.java Wed Jan 2 05:20:52 2013
@@ -20,9 +20,9 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
import com.sun.jini.qa.harness.TestException;
@@ -114,7 +114,7 @@ import java.security.NoSuchAlgorithmExce
*
* </pre>
*/
-public class ComputeDigest2Urls extends QATest {
+public class ComputeDigest2Urls extends QATestEnvironment implements Test {
QAConfig config;
/**
@@ -162,8 +162,8 @@ public class ComputeDigest2Urls extends
* <TestCaseName>.Expected - Expected result
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
/* Getting test parameters and creating TestItem objects */
@@ -172,6 +172,7 @@ public class ComputeDigest2Urls extends
for (int i = 0; i < tc_names.length; i++) {
items.add(i, new TestItem(tc_names[i]));
}
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigestCodebase.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigestCodebase.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigestCodebase.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/httpmdutil/ComputeDigestCodebase.java Wed Jan 2 05:20:52 2013
@@ -20,11 +20,12 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
+import com.sun.jini.qa.harness.Test;
import com.sun.jini.qa.harness.TestException;
// java.util
@@ -346,7 +347,7 @@ import java.security.DigestInputStream;
*
* </pre>
*/
-public class ComputeDigestCodebase extends QATest {
+public class ComputeDigestCodebase extends QATestEnvironment implements Test {
QAConfig config;
/**
@@ -407,8 +408,8 @@ public class ComputeDigestCodebase exten
* is expected or Exception otherwise)
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
/* Creating an empty file (is deleted when VM exits) */
@@ -423,6 +424,7 @@ public class ComputeDigestCodebase exten
for (int i = 0; i < tc_names.length; i++) {
items.add(i, new TestItem(tc_names[i]));
}
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/integrity/ProvidesIntegrity.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/integrity/ProvidesIntegrity.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/integrity/ProvidesIntegrity.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/integrity/ProvidesIntegrity.java Wed Jan 2 05:20:52 2013
@@ -19,7 +19,7 @@ package com.sun.jini.test.spec.url.httpm
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
-
+import com.sun.jini.qa.harness.Test;
// java.util
import java.util.logging.Level;
@@ -200,13 +200,14 @@ public class ProvidesIntegrity extends A
* - expected result (boolean value or Exception class).
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
+ public Test construct(QAConfig config) throws Exception {
/* Creating TestItem objects */
for (int i = 0; i < tc_url.length; i++) {
items.add(i, new TestItem("TestCase" + (i + 1),
tc_url[i],
tc_expected[i]));
}
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/Constructor.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/Constructor.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/Constructor.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/Constructor.java Wed Jan 2 05:20:52 2013
@@ -20,9 +20,9 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
import com.sun.jini.qa.harness.TestException;
@@ -69,7 +69,7 @@ import net.jini.url.httpmd.WrongMessageD
*
* </pre>
*/
-public class Constructor extends QATest {
+public class Constructor extends QATestEnvironment implements Test {
QAConfig config;
/**
@@ -93,13 +93,14 @@ public class Constructor extends QATest
* {@link WrongMessageDigestException}
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
/* Getting test parameter */
originalMsg = config.getStringConfigVal("Constructor.Msg",
"My Message");
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/WrongMDException.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/WrongMDException.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/WrongMDException.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/WrongMDException.java Wed Jan 2 05:20:52 2013
@@ -20,9 +20,9 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
import com.sun.jini.qa.harness.TestException;
@@ -76,7 +76,7 @@ import java.io.IOException;
*
* </pre>
*/
-public class WrongMDException extends QATest {
+public class WrongMDException extends QATestEnvironment implements Test {
QAConfig config;
/**
@@ -99,13 +99,14 @@ public class WrongMDException extends QA
* testClassServer.port - HTTP Server port number
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
/* Getting test parameters */
filename = config.getStringConfigVal("WrongMDException.File", null);
classServerPort = config.getIntConfigVal("testClassServer.port", 0);
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/WrongMDExceptionHandler.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/WrongMDExceptionHandler.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/WrongMDExceptionHandler.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/httpmd/wrongmdexc/WrongMDExceptionHandler.java Wed Jan 2 05:20:52 2013
@@ -20,9 +20,9 @@ package com.sun.jini.test.spec.url.httpm
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
import com.sun.jini.qa.harness.TestException;
@@ -96,7 +96,7 @@ public class WrongMDExceptionHandler ext
* <pre>
* This method performs all preparations.
* These preparations include the following:
- * - invoking super.setup() method,
+ * - invoking super.construct() method,
* - setting and then checking the ability to specify a TestHandler
* stream handler when constructing a HTTPMD URL,
* - creating TestHandler object.
@@ -105,8 +105,8 @@ public class WrongMDExceptionHandler ext
* testClassServer.port - HTTP Server port number
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config); // getting test parameters
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config); // getting test parameters
this.config = (QAConfig) config; // or this.config = getConfig();
/*
@@ -123,6 +123,7 @@ public class WrongMDExceptionHandler ext
/* Creating TestHandler object */
handler = new TestHandler();
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/https/integrity/ProvidesIntegrity.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/https/integrity/ProvidesIntegrity.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/https/integrity/ProvidesIntegrity.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/https/integrity/ProvidesIntegrity.java Wed Jan 2 05:20:52 2013
@@ -19,7 +19,7 @@ package com.sun.jini.test.spec.url.https
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
-
+import com.sun.jini.qa.harness.Test;
// java.util
import java.util.logging.Level;
@@ -200,13 +200,14 @@ public class ProvidesIntegrity extends A
* - expected result (boolean value or Exception class).
* </pre>
*/
- public void setup(QAConfig config) throws Exception {
+ public Test construct(QAConfig config) throws Exception {
/* Creating TestItem objects */
for (int i = 0; i < tc_url.length; i++) {
items.add(i, new TestItem("TestCase" + (i + 1),
tc_url[i],
tc_expected[i]));
}
+ return this;
}
/**
Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/util/AbstractProvidesIntegrity.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/util/AbstractProvidesIntegrity.java?rev=1427655&r1=1427654&r2=1427655&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/util/AbstractProvidesIntegrity.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/url/util/AbstractProvidesIntegrity.java Wed Jan 2 05:20:52 2013
@@ -20,11 +20,12 @@ package com.sun.jini.test.spec.url.util;
import java.util.logging.Level;
// com.sun.jini.qa
-import com.sun.jini.qa.harness.QATest;
+import com.sun.jini.qa.harness.QATestEnvironment;
import com.sun.jini.qa.harness.QAConfig;
-
+import com.sun.jini.qa.harness.Test;
// com.sun.jini.qa.harness
import com.sun.jini.qa.harness.QAConfig; // base class for QAConfig
+import com.sun.jini.qa.harness.Test;
import com.sun.jini.qa.harness.TestException;
// java.util
@@ -44,7 +45,7 @@ import java.net.URL;
* </pre>
*/
-public abstract class AbstractProvidesIntegrity extends QATest {
+public abstract class AbstractProvidesIntegrity extends QATestEnvironment implements Test {
QAConfig config;
/**
@@ -55,9 +56,10 @@ public abstract class AbstractProvidesIn
/**
* This method performs all preparations.
*/
- public void setup(QAConfig config) throws Exception {
- super.setup(config);
+ public Test construct(QAConfig config) throws Exception {
+ super.construct(config);
this.config = (QAConfig) config; // or this.config = getConfig();
+ return this;
}
/**