System.exit(-1);
}
String pathToDeployment = project.getPathToDeployment();
// start up voltdb
ServerThread server = new ServerThread(Configuration.getPathToCatalogForTest("poc.jar"), pathToDeployment, BackendTarget.NATIVE_EE_JNI);
server.start();
server.waitForInitialization();
final org.voltdb.client.Client voltclient = ClientFactory.createClient();
voltclient.createConnection("localhost");
// create initial items
voltclient.callProcedure("CreateItem", 0, 10);
voltclient.callProcedure("CreateItem", 1, 11);
voltclient.callProcedure("CreateItem", 2, 12);
// check that the query does the right thing
VoltTable result = voltclient.callProcedure("GetItems",11,1,1).getResults()[0];
System.out.println(result.toJSONString());
if (result.getRowCount() != 1) {
System.err.printf("Call failed with %d rows\n", result.getRowCount());
}
// clean up / shutdown
voltclient.close();
server.shutdown();
server.join();
}