presheaf news
presheaf.com now maintains history of your renderings... in a cookie, so there. Gotta go to sleep.
public void failingOn(String regex) {
this.failureCondition = regex;
}
public void maybeFail(Object...objects) throws HBaseException {
if (failureCondition != null) {
String s = Arrays.asList(objects).toString();
if (s.matches(failureCondition)) {
throw new HBaseException("Congratulations, you hit the jackpot today: " + s);
}
}
}
@Override public void bulkDelete(String tableName, CollectionrowKeys, String columnFamily) throws HBaseException { maybeFail("bulkDelete", tableName, rowKeys, columnFamily); table(tableName).family(columnFamily).delete(rowKeys); }
@Test
public void testPut_replicating_withErrors() throws Exception {
MockHBaseOperations cluster2 = new MockHBaseOperations();
cluster2.failingOn("\\[sendToCluster, BadTable,.*");
...
}