}
}
@Test
public void testStores() {
StoreRepository repo = storage.getStoreRepository();
for(StoreDefinition def: storeDefs) {
// test local stores
assertTrue("Missing local store '" + def.getName() + "'.",
repo.hasLocalStore(def.getName()));
assertEquals(def.getName(), repo.getLocalStore(def.getName()).getName());
assertTrue("Missing storage engine '" + def.getName() + "'.",
repo.hasStorageEngine(def.getName()));
assertEquals(def.getName(), repo.getStorageEngine(def.getName()).getName());
Integer[] nodeIds = cluster.getNodeIds().toArray(new Integer[0]);
for (int index = 0; index < cluster.getNumberOfNodes(); index++) {
assertTrue("Missing node store '" + def.getName() + "'.",
repo.hasNodeStore(def.getName(), nodeIds[index]));
assertEquals(def.getName(), repo.getNodeStore(def.getName(), nodeIds[index])
.getName());
}
}
}