config2.setPartitionCount(1);
config2.setMaxConnectionsPerPartition(2);
}
private static void createTable(Injector injector, Class<? extends Annotation> selector) {
Persister persister = injector.getInstance(Key.get(Persister.class, selector));
persister.call(new Persister.InWork() {
@Override
public Object perform(EntityStore es) throws Throwable {
((Sql) es.delegate()).execute("create table my_table (id integer, name text not null)");
return null;
}
});
final AtomicBoolean tableExists = new AtomicBoolean();
persister.call(new Persister.InWork() {
@Override
public Object perform(EntityStore es) throws Throwable {
tableExists.set(((Sql) es.delegate()).tableExists("my_table"));
return null;
}