}
waitForClusterToForm(neededCacheNames);
}
public void testReindexing() throws Exception {
caches.get(0).put(key("F1NUM"), new Car("megane", "white", 300));
verifyFindsCar(1, "megane");
caches.get(1).put(key("F2NUM"), new Car("megane", "blue", 300));
verifyFindsCar(2, "megane");
//add an entry without indexing it:
caches.get(1).getAdvancedCache().withFlags(Flag.SKIP_INDEXING).put(key("F3NUM"), new Car("megane", "blue", 300));
verifyFindsCar(2, "megane");
//re-sync datacontainer with indexes:
rebuildIndexes();
verifyFindsCar(3, "megane");
//verify we cleanup old stale index values: