// Validation
assertTrue("MST messages not logged", results.size() > 0);
// Load VirtualHost list from file.
ServerConfiguration configuration = new ServerConfiguration(_configFile);
List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
//Validate each vhost logs a creation
results = _monitor.findMatches("MST-1004 : Recovery Start : " + queueName);
assertEquals("Recovered test queue not found.", 1, results.size());
String result = getLog(results.get(0));
validateMessageID("MST-1004", result);
assertTrue("MST-1004 does end with queue '" + queueName + "':" + getMessageString(result),
getMessageString(result).endsWith(queueName));
results = _monitor.findMatches("MST-1005");
assertTrue("Insufficient MST-1005 logged.", results.size()>0);
result = null;
// If the first message is not our queue the second one will be
for(String resultEntry : results)
{
// Look for first match and set that to result
if (resultEntry.contains(queueName))
{
result = getLog(resultEntry);
break;
}
}
assertNotNull("MST-1005 entry for queue:" + queueName + ". Not found", result);
// getSlize will return extract the vhost from vh(/test) -> '/test'
// so remove the '/' to get the name
String vhostName = AbstractTestLogSubject.getSlice("vh", result).substring(1);
// To get the store class used in the configuration we need to know
// the virtualhost name, found above. AND
// the index that the virtualhost is within the configuration.
// we can retrive that from the vhosts list previously extracted.
String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
// Get the Simple class name from the expected class name of o.a.q.s.s.MMS
String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);
assertTrue("MST-1005 does end with queue 'test-queue':" + getMessageString(result),