Author: peter_firmstone Date: Sun May 11 03:59:36 2014 New Revision: 1593754
URL: http://svn.apache.org/r1593754 Log: Replace Vector with ArrayList in lookup tests, utilise Collections.sort and RemoteEventComparator, when events need to be ordered at the client before checking results. Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrAdd.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrDel.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrMod.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNonNull.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNull.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNonNull.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNull.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNonNull.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNull.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcLeaseExp.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcReg.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNonNull.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNull.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntrySrvcReg.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnAttrSet.java river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnComboAttrSet.java Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrAdd.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrAdd.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrAdd.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrAdd.java Sun May 11 03:59:36 2014 @@ -25,6 +25,7 @@ import com.sun.jini.qa.harness.TestExcep import com.sun.jini.test.spec.lookupservice.QATestRegistrar; import com.sun.jini.test.spec.lookupservice.QATestUtils; +import com.sun.jini.test.spec.lookupservice.RemoteEventComparator; import net.jini.core.lookup.ServiceRegistrar; import net.jini.core.lookup.ServiceEvent; import net.jini.core.lookup.ServiceItem; @@ -42,6 +43,8 @@ import java.rmi.RemoteException; import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; /** This class is used to verify that after using templates containing only @@ -64,11 +67,13 @@ public class NotifyOnAttrAdd extends QAT /** Method called remotely by lookup to handle the generated event. */ public void notify(RemoteEvent ev) { ServiceEvent srvcEvnt = (ServiceEvent)ev; - evntVec.add(srvcEvnt); + synchronized (NotifyOnAttrAdd.this){ + evntVec.add(srvcEvnt); + } } } - protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected final List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(50); private ServiceItem[] srvcItems ; private ServiceRegistration[] srvcRegs ; @@ -185,6 +190,7 @@ public class NotifyOnAttrAdd extends QAT } logger.log(Level.FINE, "Checking for the expected set of events."); + Collections.sort(evntVec, new RemoteEventComparator()); QATestUtils.verifyEventVector(evntVec,nExpectedEvnts, EXPECTED_TRANSITION,srvcRegs); } Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrDel.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrDel.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrDel.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrDel.java Sun May 11 03:59:36 2014 @@ -25,6 +25,7 @@ import com.sun.jini.qa.harness.TestExcep import com.sun.jini.test.spec.lookupservice.QATestRegistrar; import com.sun.jini.test.spec.lookupservice.QATestUtils; +import com.sun.jini.test.spec.lookupservice.RemoteEventComparator; import net.jini.core.lookup.ServiceRegistrar; import net.jini.core.lookup.ServiceEvent; import net.jini.core.lookup.ServiceItem; @@ -42,6 +43,8 @@ import java.rmi.RemoteException; import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; /** This class is used to verify that after using templates containing only @@ -65,11 +68,13 @@ public class NotifyOnAttrDel extends QAT /** Method called remotely by lookup to handle the generated event. */ public void notify(RemoteEvent ev) { ServiceEvent srvcEvnt = (ServiceEvent)ev; - evntVec.add(srvcEvnt); + synchronized (NotifyOnAttrDel.this){ + evntVec.add(srvcEvnt); + } } } - protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected final List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(50); private ServiceItem[] srvcItems ; private ServiceRegistration[] srvcRegs ; @@ -205,6 +210,7 @@ public class NotifyOnAttrDel extends QAT } logger.log(Level.FINE, "Verifying expected event set."); + Collections.sort(evntVec, new RemoteEventComparator()); QATestUtils.verifyEventVector(evntVec,nExpectedEvnts, EXPECTED_TRANSITION,srvcRegs); } Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrMod.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrMod.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrMod.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrMod.java Sun May 11 03:59:36 2014 @@ -24,6 +24,7 @@ import java.util.logging.Level; import com.sun.jini.test.spec.lookupservice.QATestRegistrar; import com.sun.jini.test.spec.lookupservice.QATestUtils; +import com.sun.jini.test.spec.lookupservice.RemoteEventComparator; import net.jini.core.lookup.ServiceRegistrar; import net.jini.core.lookup.ServiceEvent; import net.jini.core.lookup.ServiceItem; @@ -41,6 +42,8 @@ import java.rmi.StubNotFoundException; import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; /** This class is used to verify that after using templates containing only @@ -62,11 +65,13 @@ public class NotifyOnAttrMod extends QAT /** Method called remotely by lookup to handle the generated event. */ public void notify(RemoteEvent ev) { ServiceEvent srvcEvnt = (ServiceEvent)ev; - evntVec.add(srvcEvnt); + synchronized (NotifyOnAttrMod.this){ + evntVec.add(srvcEvnt); + } } } - protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected final List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(50); private ServiceItem[] srvcItems ; private ServiceRegistration[] srvcRegs ; @@ -206,6 +211,7 @@ public class NotifyOnAttrMod extends QAT } logger.log(Level.FINE, "Verifying expected event set."); + Collections.sort(evntVec, new RemoteEventComparator()); QATestUtils.verifyEventVector(evntVec,nExpectedEvnts, EXPECTED_TRANSITION,srvcRegs); } Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java Sun May 11 03:59:36 2014 @@ -69,10 +69,10 @@ public class NotifyOnSrvcLeaseExpiration public void notify(RemoteEvent ev) { ServiceEvent srvcEvnt = (ServiceEvent)ev; synchronized (NotifyOnSrvcLeaseExpiration.this){ - evntVec.add(srvcEvnt); + evntVec.add(srvcEvnt); + } } } - } protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(50); Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNonNull.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNonNull.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNonNull.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNonNull.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing a @@ -68,29 +69,31 @@ public class NotifyOnComboAttrAddNonNull /** Method called remotely by lookup to handle the generated event. */ public void notify(RemoteEvent ev) { ServiceEvent srvcEvnt = (ServiceEvent)ev; - evntVec.add(srvcEvnt); - try { - QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple) - (srvcEvnt.getRegistrationObject().get()); - - receivedTuples.add(new QATestUtils.SrvcAttrTuple - (srvcItems,addAttrs, - tuple.getSrvcObj(), - tuple.getAttrObj(), - srvcEvnt.getTransition())); - } catch (ClassNotFoundException e) { - logger.log(Level.INFO, "Unexpected exception", e); - } catch (IOException e) { - logger.log(Level.INFO, "Unexpected exception", e); + synchronized (NotifyOnComboAttrAddNonNull.this){ + evntVec.add(srvcEvnt); + try { + QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple) + (srvcEvnt.getRegistrationObject().get()); + + receivedTuples.add(new QATestUtils.SrvcAttrTuple + (srvcItems,addAttrs, + tuple.getSrvcObj(), + tuple.getAttrObj(), + srvcEvnt.getTransition())); + } catch (ClassNotFoundException e) { + logger.log(Level.INFO, "Unexpected exception", e); + } catch (IOException e) { + logger.log(Level.INFO, "Unexpected exception", e); + } } } } protected QATestUtils.SrvcAttrTuple[][][] oldState; protected QATestUtils.SrvcAttrTuple[][][] newState; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2850); + protected List receivedTuples = new ArrayList(2850); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2850); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNull.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNull.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNull.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNull.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /* This class is used to verify that after using templates containing a @@ -90,9 +91,9 @@ public class NotifyOnComboAttrAddNull ex protected QATestUtils.SrvcAttrTuple[][][] oldState; protected QATestUtils.SrvcAttrTuple[][][] newState; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2850); + protected List receivedTuples = new ArrayList(2850); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2850); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNonNull.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNonNull.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNonNull.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNonNull.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing a @@ -90,9 +91,9 @@ public class NotifyOnComboAttrDelNonNull protected QATestUtils.SrvcAttrTuple[][][] oldState; protected QATestUtils.SrvcAttrTuple[][][] newState; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2670); + protected List receivedTuples = new ArrayList(2670); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2670); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNull.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNull.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNull.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNull.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing a @@ -90,9 +91,9 @@ public class NotifyOnComboAttrDelNull ex protected QATestUtils.SrvcAttrTuple[][][] oldState; protected QATestUtils.SrvcAttrTuple[][][] newState; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2460); + protected List receivedTuples = new ArrayList(2460); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2460); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNonNull.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNonNull.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNonNull.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNonNull.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing a @@ -70,7 +71,7 @@ public class NotifyOnComboAttrModNonNull try { ServiceEvent srvcEvnt = (ServiceEvent)ev; synchronized (NotifyOnComboAttrModNonNull.this){ - evntVec.add(srvcEvnt); + evntVec.add(srvcEvnt); QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple) (srvcEvnt.getRegistrationObject().get()); @@ -90,9 +91,9 @@ public class NotifyOnComboAttrModNonNull protected QATestUtils.SrvcAttrTuple[][][] oldState; protected QATestUtils.SrvcAttrTuple[][][] newState; - protected final List expectedTuples = new Vector(); - protected final List receivedTuples = new Vector(); - protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected final List expectedTuples = new ArrayList(2850); + protected final List receivedTuples = new ArrayList(2850); + protected final List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2850); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNull.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNull.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNull.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNull.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing a @@ -90,9 +91,9 @@ public class NotifyOnComboAttrModNull ex protected QATestUtils.SrvcAttrTuple[][][] oldState; protected QATestUtils.SrvcAttrTuple[][][] newState; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2850); + protected List receivedTuples = new ArrayList(2850); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2850); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcLeaseExp.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcLeaseExp.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcLeaseExp.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcLeaseExp.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing a @@ -90,9 +91,9 @@ public class NotifyOnComboSrvcLeaseExp e protected QATestUtils.SrvcAttrTuple[][][] oldState; protected QATestUtils.SrvcAttrTuple[][][] newState; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2850); + protected List receivedTuples = new ArrayList(2850); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2850); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcReg.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcReg.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcReg.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcReg.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing a @@ -90,9 +91,9 @@ public class NotifyOnComboSrvcReg extend protected QATestUtils.SrvcAttrTuple[][][] oldState; protected QATestUtils.SrvcAttrTuple[][][] newState; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2850); + protected List receivedTuples = new ArrayList(2850); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2850); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNonNull.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNonNull.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNonNull.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNonNull.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing only @@ -89,9 +90,9 @@ public class NotifyOnEntryAttrAddNonNull } protected QATestUtils.SrvcAttrTuple[][][] state; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2850); + protected List receivedTuples = new ArrayList(2850); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2850); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNull.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNull.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNull.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNull.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing only @@ -88,9 +89,9 @@ public class NotifyOnEntryAttrAddNull ex } protected QATestUtils.SrvcAttrTuple[][][] state; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2850); + protected List receivedTuples = new ArrayList(2850); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2850); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntrySrvcReg.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntrySrvcReg.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntrySrvcReg.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntrySrvcReg.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing only @@ -86,9 +87,9 @@ public class NotifyOnEntrySrvcReg extend } protected QATestUtils.SrvcAttrTuple[][][] state; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2850); + protected List receivedTuples = new ArrayList(2850); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2850); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals; Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnAttrSet.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnAttrSet.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnAttrSet.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnAttrSet.java Sun May 11 03:59:36 2014 @@ -24,6 +24,7 @@ import com.sun.jini.qa.harness.TestExcep import com.sun.jini.test.spec.lookupservice.QATestRegistrar; import com.sun.jini.test.spec.lookupservice.QATestUtils; +import com.sun.jini.test.spec.lookupservice.RemoteEventComparator; import net.jini.core.lookup.ServiceRegistrar; import net.jini.core.lookup.ServiceEvent; import net.jini.core.lookup.ServiceItem; @@ -41,6 +42,8 @@ import java.rmi.StubNotFoundException; import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; /** This class is used to verify that after using templates containing only @@ -65,11 +68,13 @@ public class NotifyOnAttrSet extends QAT /** Method called remotely by lookup to handle the generated event. */ public void notify(RemoteEvent ev) { ServiceEvent srvcEvnt = (ServiceEvent)ev; - evntVec.add(srvcEvnt); + synchronized(NotifyOnAttrSet.this){ + evntVec.add(srvcEvnt); + } } } - protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected final List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(50); private ServiceItem[] srvcItems ; private ServiceRegistration[] srvcRegs ; @@ -222,6 +227,7 @@ public class NotifyOnAttrSet extends QAT // Thread.sleep(deltaTListener); } catch (InterruptedException e) { } + Collections.sort(evntVec, new RemoteEventComparator()); QATestUtils.verifyEventVector(evntVec,nExpectedEvnts, EXPECTED_TRANSITION,srvcRegs); } Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnComboAttrSet.java URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnComboAttrSet.java?rev=1593754&r1=1593753&r2=1593754&view=diff ============================================================================== --- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnComboAttrSet.java (original) +++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnComboAttrSet.java Sun May 11 03:59:36 2014 @@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException; import java.util.Vector; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** This class is used to verify that after using templates containing a @@ -88,9 +89,9 @@ public class NotifyOnComboAttrSet extend protected QATestUtils.SrvcAttrTuple[][][] oldState; protected QATestUtils.SrvcAttrTuple[][][] newState; - protected List expectedTuples = new Vector(); - protected List receivedTuples = new Vector(); - protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>(); + protected List expectedTuples = new ArrayList(2850); + protected List receivedTuples = new ArrayList(2850); + protected List<ServiceEvent> evntVec = new ArrayList<ServiceEvent>(2850); private ServiceItem[] srvcItems; private ServiceItem[] srvcsForEquals;
