use of herddb.server.Server in project herddb by diennea.
the class TransactionsTest method emptyTransaction.
/**
* Commit on a connection without any work
*/
@Test
public void emptyTransaction() throws Exception {
try (Server server = new Server(new ServerConfiguration(folder.newFolder().toPath()))) {
server.start();
server.waitForStandaloneBoot();
try (HDBClient client = new HDBClient(new ClientConfiguration(folder.newFolder().toPath()))) {
client.setClientSideMetadataProvider(new StaticClientSideMetadataProvider(server));
try (BasicHerdDBDataSource dataSource = new BasicHerdDBDataSource(client);
Connection con = dataSource.getConnection()) {
con.setAutoCommit(false);
con.commit();
}
}
}
}
Aggregations