checkCluster(clusterName, pluginListName, clusterSize);
}
private void checkCluster(String clusterName, String pluginListName, int clusterSize) {
FarmGBean.JpaContext context = new FarmGBean.JpaContext(emf);
JpaClusterInfo cluster = context.getClusterInfo(clusterName);
log.info("retrieved " + cluster.getName());
log.info("cluster pluginlist count: " + cluster.getPluginLists().size());
JpaPluginList pluginList = cluster.getPluginLists().iterator().next();
if (!pluginList.getName().equals(pluginListName)) {
throw new IllegalStateException("Wrong name: " + pluginList.getName());
}
List<JpaClusterInfo> clusters = pluginList.getClusters();
if (clusters.size() != clusterSize) {