logger.log(Level.FINE,
"LookupDiscovery just created should "
+"additionally discover groups -- ");
GroupsUtil.displayGroupSet(additionalGroups,
" additionalGroups",Level.FINE);
LookupDiscovery ld = new LookupDiscovery(groupsToDiscover,
getConfig().getConfiguration());
lookupDiscoveryList.add(ld);
LookupListener newListener = new AbstractBaseTest.LookupListener();
/* Verify that the lookup discovery utility created above is
* operational by verifying that the INITIIAL lookups are
* discovered by both listeners.
*/
logger.log(Level.FINE,
"verifying discovery for initial listener ...");
mainListener.setLookupsToDiscover(initLookupsToStart);
ld.addDiscoveryListener(mainListener);
waitForDiscovery(mainListener);
logger.log(Level.FINE,
"verifying discovery for listener to be removed ...");
newListener.setLookupsToDiscover(initLookupsToStart);
ld.addDiscoveryListener(newListener);
waitForDiscovery(newListener);
/* Remove the listener */
ld.removeDiscoveryListener(newListener);
logger.log(Level.FINE,
"removed listener from lookup discovery");
/* Verify that the listener still registered with the lookup
* discovery utility (mainListener) continues to receive