registry = new WebAppRegistry();
container.addWebAppListener(registry);
keys = new HashSet<String>(registry.getKeys());
// Deploy the web app with init param of gatein.wci.native.DisableRegistration set to true
return new DeployResponse("test-native-skip-app.war");
}
else if (getRequestCount() == 0)
{
//make sure the test-native-skip-app.war is actually skipped
if (registry.getWebApp("/test-native-skip-app") != null)
{
return new FailureResponse(Failure.createAssertionFailure("The test-native-skip-app.war should not be seen by the native implemetentation."));
}
// Compute the difference with the previous deployed web apps
Set diff = new HashSet<String>(registry.getKeys());
diff.removeAll(keys);
// It should be 0, since the test-native-skip-app.war should not get registered by the native implementation
if (diff.size() != 0)
{
return new FailureResponse(Failure.createAssertionFailure("The size of the new web application deployed should be 0, it is " + diff.size() + " instead." +
"The previous set was " + keys + " and the new set is " + registry.getKeys()));
}
return new DeployResponse("test-native-skip-with-gateinservlet-app.war");
}
else if (getRequestCount() == 1)
{
// Compute the difference with the previous deployed web apps
Set diff = new HashSet<String>(registry.getKeys());