org.apache.river.qa.spec.
servicediscovery.
DefaultDiscoverPublic
With
respect to the lookup discovery processing performed by the
ServiceDiscoveryManager
utility class, verifies that the ServiceDiscoveryManager
operates as specified. That is, this test verifies the following
statement from the specification:
“If
the value of the DiscoveryManagement
argument is null,
then an instance of the net.jini.discovery.
LookupDiscoveryManager
utility class will be constructed to discover only those lookup
services that are members of the public
group.”
|
Start
no lookup services
Create
an instance of ServiceDiscoveryManager,
inputting null for both the DiscoveryManagement
parameter and the LeaseRenewalManager
parameter
Invoke
the getDiscoveryManager
method on the service discovery manager created in step 2
Verify
that the object retrieved in step 3 is and instance of
LookupDiscoveryManager
Invoke
the getGroups method on
the lookup discovery manager retrieved in step 3
Verify the set of groups
retrieved in step 5 contain only the public group
|
A1,M1
|
SD.4.1.1
|
org.apache.river.qa.spec.
servicediscovery.cache.
AddListenerNPE
Verifies
that the addListener
method of the lookup cache employed by the
ServiceDiscoveryManager
utility class operates as specified. That is, this test verifies
the following statement from the specification:
“If null
is input as the listener parameter of the addListener
method of the LookupCache interface, a NullPointerException
is thrown.”
|
Start
no lookup services
Create
an instance of ServiceDiscoveryManager,
inputting an instance of DiscoveryManagement
that discovers no groups and no locators, and inputting null
to the LeaseRenewalManager
parameter
Invoke
the createLookupCache
method on the service discovery manager created in step 2
Invoke
the addListener method on
the lookup cache created in step 2, inputting a non-null
instance of ServiceDiscoveryListener
so as to verify that a NullPointerException
is not always thrown on any arbitrary invocation of the
addListener method
Invoke
the addListener method on
the lookup cache created in step 2, inputting null
to the listener parameter
Verify that a
NullPointerException is
thrown
|
A1,M1
|
SD.4.1.1
|
org.apache.river.qa.spec.
servicediscovery.cache.
CacheDiscard
Verifies that the discard
method of the LookupCache
interface operates as specified.
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register 1 test service with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test service
registered in step 2 based on service type only
Invoke
the createLookupCache
method on the service discovery manager created in step 3;
inputting the template created in step 4, null
as the filter parameter
(so that no first-stage filtering is applied by the lookup
cache), and null as the
listener parameter
With
respect to the lookup
method on the lookup cache created in step 5, invoke the version
that returns a single instance of ServiceItem,
inputting null as the
filter parameter so that no second-stage filtering is applied by
the lookup method
Invoke
the discard method on the
lookup cache created in step 5, inputting the service reference
returned by the lookup
method in step 6
Execute step 6 again and
verify that the service has indeed been discarded as expected
|
A1,M1
|
SD.4.1.2
SD.5.5.1
|
org.apache.river.qa.spec.
servicediscovery.cache.
CacheLookup
With
respect to the lookup
method defined by the LookupCache
interface, verifies that the version that returns a single
instance of ServiceItem
operates as specified when invoked under the following
conditions:
template
matching performed by the service discovery manager is based on
service type only
the
lookup cache applies no first-stage filtering to the
results of the template matching
the
lookup method of the
lookup cache applies no second-stage filtering to the
results of the template; that is, null
is input as the filter
parameter of the lookup
method
ServiceItem
lookup
(ServiceItemFilter
filter)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
Invoke
the createLookupCache
method on the service discovery manager created in step 3;
inputting the template created in step 4, null
as the filter parameter
(so that no first-stage filtering is applied by the lookup
cache), and null as the
listener parameter
With
respect to the lookup
method on the lookup cache created in step 5, invoke the version
that returns a single instance of ServiceItem,
inputting null as the
filter parameter so that no second-stage filtering is applied by
the lookup method
Verify that the service item
returned is the service item expected
|
A1,M1
|
SD.4.1.2
SD.5.5.1
|
org.apache.river.qa.spec.
servicediscovery.cache.
CacheLookupFilterFilter
With
respect to the lookup
method defined by the LookupCache
interface, verifies that the version that returns a single
instance of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
lookup cache applies first-stage filtering to the results
of the template matching
the
lookup method of the
lookup cache applies second-stage filtering to the
results of the template matching and the first-stage filtering
ServiceItem
lookup
(ServiceItemFilter
filter)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
During
setup, create a filter that will reject some – but not all
– of the services registered in step 2
Invoke
the createLookupCache
method on the service discovery manager created in step 3;
inputting the template created in step 4, the filter created in
step 5 (so that first-stage filtering is applied by the lookup
cache), and null as the
listener parameter
Create
a second filter that will reject some – but not all –
of the services that result when template matching and
first-stage filtering are applied to the services registered in
step 2
With
respect to the lookup
method on the lookup cache created in step 6, invoke the version
that returns a single instance of ServiceItem,
inputting the filter created in step 7 so that second-stage
filtering is applied by the lookup
method
Verify that the service item
returned is the service item expected
|
A1,M1
|
SD.4.1.2
SD.5.2.1
SD.5.5.1
|
org.apache.river.qa.spec.
servicediscovery.cache.
CacheLookupFilterNoFilter
With
respect to the lookup
method defined by the LookupCache
interface, verifies that the version that returns a single
instance of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
lookup cache applies first-stage filtering to the results
of the template matching
the
lookup method of the
lookup cache applies no second-stage filtering to the
results of the template matching and the first-stage filtering;
that is, null is input as
the filter parameter of
the lookup method
ServiceItem
lookup
(ServiceItemFilter
filter)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
During
setup, create a filter that will reject some – but not all
– of the services registered in step 2
Invoke
the createLookupCache
method on the service discovery manager created in step 3;
inputting the template created in step 4, the filter created in
step 5 (so that first-stage filtering is applied by the lookup
cache), and null as the
listener parameter
With
respect to the lookup
method on the lookup cache created in step 6, invoke the version
that returns a single instance of ServiceItem,
inputting null as the
filter parameter so that no second-stage filtering is applied by
the lookup method
Verify that the service item
returned is the service item expected
|
A1,M1
|
SD.4.1.2
SD.5.2.1
SD.5.5.1
|
org.apache.river.qa.spec.
servicediscovery.cache.
CacheLookupNoFilterFilter
With
respect to the lookup
method defined by the LookupCache
interface, verifies that the version that returns a single
instance of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
lookup cache applies no first-stage filtering to the
results of the template matching
the
lookup method of the
lookup cache applies second-stage filtering to the
results of the template
ServiceItem
lookup
(ServiceItemFilter
filter)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
Invoke
the createLookupCache
method on the service discovery manager created in step 3;
inputting the template created in step 4, null
as the filter parameter
(so that no first-stage filtering is applied by the lookup
cache), and null as the
listener parameter
Create
a second filter that will reject some – but not all –
of the services that result when template matching is applied to
the services registered in step 2
With
respect to the lookup
method on the lookup cache created in step 5, invoke the version
that returns a single instance of ServiceItem,
inputting the filter created in step 6 so that second-stage
filtering is applied by the lookup
method
Verify that the service item
returned is the service item expected
|
A1,M1
|
SD.4.1.2
SD.5.2.1
SD.5.5.1
|
org.apache.river.qa.spec.
servicediscovery.event.
AddAttrServiceChanged
Verifies that the event mechanism
defined by the LookupCache
interface operates as specified with respect to the serviceAdded
events when the set of attributes associated with a set of
registered services is augmented (add attributes).
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
explicitly pre-set
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services that
will be registered based on service type only
With
each of the lookup services started in step 1, register M test
services along with an associated attribute, and verify that the
registration was successful
Invoke
the createLookupCache
method on the service discovery manager created in step 2;
inputting the template created in step 3, null
as the filter parameter
(so that no first-stage filtering is applied by the lookup
cache), and a non-null
instance of ServiceDiscoveryListener
to register with the event mechanism of the lookup cache
returned by the call to createLookupCache
Verify
that the lookup cache created in step 5 and its event mechanism
operates as expected
To each service registered
in step 4, add a new attribute, and verify that the expected
serviceAdded events are
sent by the event mechanism of the lookup cache created in step
5
|
A1,M1
|
SD.4.1.2
SD.5.3.1
SD.5.4.1
|
org.apache.river.qa.spec.
servicediscovery.event.
ModifyAttrServiceChanged
Verifies that the event mechanism
defined by the LookupCache
interface operates as specified with respect to the
serviceChanged events when
the set of attributes associated with a set of registered
services is modified.
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
explicitly pre-set
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services that
will be registered based on service type only
With
each of the lookup services started in step 1, register M test
services along with an associated attribute, and verify that the
registration was successful
Invoke
the createLookupCache
method on the service discovery manager created in step 2;
inputting the template created in step 3, null
as the filter parameter
(so that no first-stage filtering is applied by the lookup
cache), and a non-null
instance of ServiceDiscoveryListener
to register with the event mechanism of the lookup cache
returned by the call to createLookupCache
Verify
that the lookup cache created in step 5 and its event mechanism
operates as expected
Modify the attributes
associated with each service registered in step 4, and verify
that the expected serviceChanged
events are sent by the event mechanism of the lookup cache
created in step 5
|
A1,M1
|
SD.4.1.2
SD.5.3.1
SD.5.4.1
|
org.apache.river.qa.spec.
servicediscovery.event.
SetAttrServiceChanged
Verifies that the event mechanism
defined by the LookupCache
interface operates as specified with respect to the
serviceRemoved events when
the set of attributes associated with a set of registered
services is replaced.
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
explicitly pre-set
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services that
will be registered based on service type only
With
each of the lookup services started in step 1, register M test
services along with an associated attribute, and verify that the
registration was successful
Invoke
the createLookupCache
method on the service discovery manager created in step 2;
inputting the template created in step 3, null
as the filter parameter
(so that no first-stage filtering is applied by the lookup
cache), and a non-null
instance of ServiceDiscoveryListener
to register with the event mechanism of the lookup cache
returned by the call to createLookupCache
Verify
that the lookup cache created in step 5 and its event mechanism
operates as expected
Replace with a new set of
attributes, the attributes associated with each service
registered in step 4, and verify that the expected
serviceRemoved events are
sent by the event mechanism of the lookup cache created in step
5
|
A1,M1
|
SD.4.1.2
SD.5.3.1
SD.5.4.1
|
org.apache.river.qa.spec.
servicediscovery.lookup.
Lookup
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the non-blocking version that
returns a single instance of ServiceItem
operates as specified when invoked under the following
conditions:
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
ServiceItemFilter
filter)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the non-blocking version that returns a single instance
of ServiceItem, inputting
the template created in step 4, and inputting null
as the filter parameter so that no filtering is applied by the
lookup method
Verify that the service item
returned is the service item expected
|
A1,M1
|
SD.4.1.1
SD.4.1.3
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupFilter
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the non-blocking version that
returns a single instance of ServiceItem
operates as specified when invoked under the following
conditions:
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
ServiceItemFilter
filter)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
During
setup, create a filter that will reject some – but not all
– of the services registered in step 2
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the non-blocking version that returns a single instance
of ServiceItem, inputting
the template created in step 4, and the filter created in step 5
so that filtering is applied by the lookup
method
Verify that the service item
returned is the service item expected
|
A1,M1
|
SD.4.1.1
SD.4.1.3
SD.5.2.1
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupMax
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the non-blocking version that
returns an array of instances of ServiceItem
operates as specified when invoked under the following
conditions:
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
int
maxMatches,
ServiceItemFilter
filter)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the non-blocking version that returns an array of
instances of ServiceItem,
inputting the template created in step 4, and inputting null
as the filter parameter so that no filtering is applied by the
lookup method
Verify that the service
items returned are the service items expected
|
A1,M1
|
SD.4.1.1
SD.4.1.3
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupMaxFilter
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the non-blocking version that
returns an array of instances of ServiceItem
operates as specified when invoked under the following
conditions:
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
int
maxMatches,
ServiceItemFilter
filter)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
During
setup, create a filter that will reject some – but not all
– of the services registered in step 2
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the non-blocking version that returns an array of
instances of ServiceItem,
inputting the template created in step 4, and the filter created
in step 5 so that filtering is applied by the lookup
method
Verify that the service
items returned are the service items expected
|
A1,M1
|
SD.4.1.1
SD.4.1.3
SD.5.2.1
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupMinEqualsMax
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the blocking version that
returns an array of instances of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
service discovery manager applies no filtering to the results of
the template matching
the
minimum number of desired services is equal to the maximum
number of desired services
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
int
minMatches,
int
maxMatches,
ServiceItemFilter
filter,
long
waitDur)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the blocking version that returns an array of instances
of ServiceItem, inputting
the template created in step 4, inputting null
as the filter parameter so that no filtering is applied by the
lookup method, and
inputting the same value for both the minMatches
and maxMatches parameters
Verify that the service
items returned are the service items expected, and that the
blocking mechanism of the lookup
method blocks for the expected amount of time
|
A1,M1
|
SD.4.1.1
SD.4.1.3
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupMinEqualsMaxFilter
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the blocking version that
returns an array of instances of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
service discovery manager applies filtering to the results of
the template matching
the
minimum number of desired services is equal to the maximum
number of desired services
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
int
minMatches,
int
maxMatches,
ServiceItemFilter
filter,
long
waitDur)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
During
setup, create a filter that will reject some – but not all
– of the services registered in step 2
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the blocking version that returns an array of instances
of ServiceItem, inputting
the template created in step 4, the filter created in step 5 so
that filtering is applied by the lookup
method, and inputting the same value for both the minMatches
and maxMatches parameters
Verify that the service
items returned are the service items expected, and that the
blocking mechanism of the lookup
method blocks for the expected amount of time
|
A1,M1
|
SD.4.1.1
SD.4.1.3
SD.5.2.1
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupMinLessMax
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the blocking version that
returns an array of instances of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
service discovery manager applies no filtering to the results of
the template matching
the
minimum number of desired services is less than the maximum
number of desired services
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
int
minMatches,
int
maxMatches,
ServiceItemFilter
filter,
long
waitDur)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the blocking version that returns an array of instances
of ServiceItem, inputting
the template created in step 4, inputting null
as the filter parameter so that no filtering is applied by the
lookup method, and
inputting values for the minMatches
and maxMatches parameters
in which minMatches is
less than maxMatches
Verify that the service
items returned are the service items expected, and that the
blocking mechanism of the lookup
method blocks for the expected amount of time
|
A1,M1
|
SD.4.1.1
SD.4.1.3
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupMinLessMaxFilter
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the blocking version that
returns an array of instances of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
service discovery manager applies filtering to the results of
the template matching
the
minimum number of desired services is less than the maximum
number of desired services
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
int
minMatches,
int
maxMatches,
ServiceItemFilter
filter,
long
waitDur)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
During
setup, create a filter that will reject some – but not all
– of the services registered in step 2
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the blocking version that returns an array of instances
of ServiceItem, inputting
the template created in step 4, the filter created in step 5 so
that no filtering is applied by the lookup
method, and inputting values for the minMatches
and maxMatches parameters
in which minMatches is
less than maxMatches
Verify that the service
items returned are the service items expected, and that the
blocking mechanism of the lookup
method blocks for the expected amount of time
|
A1,M1
|
SD.4.1.1
SD.4.1.3
SD.5.2.1
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupMinMaxNoBlock
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the blocking version that
returns an array of instances of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
service discovery manager applies no filtering to the results of
the template matching
the
number of services available for discovery is greater than the
acceptable minimum number of services input to the lookup
method
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
int
minMatches,
int
maxMatches,
ServiceItemFilter
filter,
long
waitDur)
If there are more services
available to be discovered than the acceptable minimum number of
services (minMatches),
then no blocking should occur; rather, the lookup
method should return immediately after discovering the acceptable
number of services.
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M (M >= 1) test services with some subset of
the lookup services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the blocking version that returns an array of instances
of ServiceItem, inputting
the template created in step 4, inputting null
as the filter parameter so that no filtering is applied by the
lookup method, and
inputting a value for the minMatches
parameter that is less than or equal to the number of services
registered in step 2, and a value for the maxMatches
parameters that is greater than or equal to the value of
minMatches
Verify that the service
items returned are the service items expected, and that the
blocking mechanism of the lookup
method returns immediately without blocking
|
A1,M1
|
SD.4.1.1
SD.4.1.3
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupMinMaxNoBlockFilter
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the blocking version that
returns an array of instances of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
service discovery manager applies filtering to the results of
the template matching
the
number of services available for discovery is greater than the
acceptable minimum number of services input to the lookup
method
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
int
minMatches,
int
maxMatches,
ServiceItemFilter
filter,
long
waitDur)
If there are more services
available to be discovered than the acceptable minimum number of
services (minMatches),
then no blocking should occur; rather, the lookup
method should return immediately after discovering the acceptable
number of services.
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M (M >= 1) test services with some subset of
the lookup services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
During
setup, create a filter that will reject some – but not all
– of the services registered in step 2
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the blocking version that returns an array of instances
of ServiceItem, inputting
the template created in step 4, the filter created in step 5 so
that no filtering is applied by the lookup
method, and inputting a value for the minMatches
parameter that is less than or equal to the number of services
registered in step 2, and a value for the maxMatches
parameters that is greater than or equal to the value of
minMatches
Verify that the service
items returned are the service items expected, and that the
blocking mechanism of the lookup
method returns immediately without blocking
|
A1,M1
|
SD.4.1.1
SD.4.1.3
SD.5.2.1
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupWait
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the blocking version that
returns a single instance of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
service discovery manager applies no filtering to the results of
the template matching
the
minimum number of desired services is equal to the maximum
number of desired services
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
ServiceItemFilter
filter,
long
waitDur)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test service that
will be registered in step 6 based on service type only
With
respect to the lookup
method on the service discovery manager created in step 2,
invoke the blocking version that returns a single instance of
ServiceItem, inputting
the template created in step 3, and inputting null
as the filter parameter so that no filtering is applied by the
lookup method
Verify
that because no services are currently available to be
discovered, the call to the lookup
method blocks for the full amount of time requested through the
waitDur parameter
Register
1 test service with each of the lookup services created in step
1
Again invoke the lookup
method in the same way as in step 4, and verify that the service
item returned is the service item expected, and that the
blocking mechanism of the lookup
method blocks until the registration of the test service from
step 6 completes successfully
|
A1,M1
|
SD.4.1.1
SD.4.1.3
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupWaitFilter
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the blocking version that
returns a single instance of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
service discovery manager applies filtering to the results of
the template matching
the
minimum number of desired services is equal to the maximum
number of desired services
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
ServiceItemFilter
filter,
long
waitDur)
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services that
will be registered in steps 7 and 10 based on service type only
During
setup, create a filter that will reject some – but not all
– of the services that will be registered in steps 7 and
10
With
respect to the lookup
method on the service discovery manager created in step 2,
invoke the blocking version that returns a single instance of
ServiceItem, inputting
the template created in step 4, and inputting the filter created
in step 3 so that filtering is applied by the lookup
method
Verify
that because no services are currently available to be
discovered, the call to the lookup
method blocks for the full amount of time requested through the
waitDur parameter
Register
3 test services and 1 associated attribute with each of the
lookup services created in step 1
Create
a template that will match the test services registered in step
7 based on both the service type and each service’s
associated attribute
Again
invoke the lookup method in the same way as in step 5, and
verify that the service item returned is the service item
expected, and that the blocking mechanism of the lookup
method blocks until the registrations of the test services from
step 6 complete successfully
With
each lookup service started in step 1, register 4 more test
services, each with 1 associated attribute
Create
a template that will match the test services registered in step
10 based on both the service type and each service’s
associated attribute
Again invoke the lookup
method in the same way as in steps 5 and 9, and verify that
because the filter rejects the services that would normally be
discovered if the filter were not applied, the call to the
lookup method blocks for
the full amount of time requested through the waitDur
parameter
|
A1,M1
|
SD.4.1.1
SD.4.1.3
SD.5.2.1
|
org.apache.river.qa.spec.
servicediscovery.lookup.
LookupWaitNoBlock
With
respect to the lookup
method defined by the ServiceDiscoveryManager
utility class, verifies that the blocking version that
returns a single instance of ServiceItem
operates as specified when invoked under the following
conditions:
template matching performed by the service discovery manager is
based on service type only
the
service discovery manager applies no filtering to the results of
the template matching
at
least 1 matching service is already available for discovery when
the lookup method is
called
ServiceItem
lookup
(ServiceItemTemplate
tmpl,
ServiceItemFilter
filter,
long
waitDur)
If at least 1 matching service is
already available to be discovered when the lookup
method is called (that is, the lookup
method does not have to wait for the desired service to be
registered), then the lookup
method will not block. In that case, the lookup
method should return immediately after discovering the desired
service.
|
During
setup, start N lookup services whose member groups are finite
(not NO_GROUPS) and unique (not public) relative to the member
groups of all other lookup services running within the same
multicast radius of the lookup; and whose locator ports are
randomly selected
During
setup, register M test services with some subset of the lookup
services created in step 1
During
setup, create an instance of ServiceDiscoveryManager
that discovers the lookup services started in step 1, and which
uses the default lease renewal manager to manage any leases on
registrations with the event mechanism of the lookup services
During
setup, create a template that will match the test services
registered in step 2 based on service type only
With
respect to the lookup
method on the service discovery manager created in step 3,
invoke the blocking version that returns a single instance of
ServiceItem, inputting
the template created in step 4, and inputting null
as the filter parameter so that no filtering is applied by the
lookup method
Verify that the service item
returned is the service item expected, and that the blocking
mechanism of the lookup
method returns immediately without blocking
|
A1,M1
|
SD.4.1.1
SD.4.1.3
|