use of org.teiid.adminapi.Transaction in project teiid by teiid.
the class TestTransactionServer method testGetTransactions.
@Test
public void testGetTransactions() throws Exception {
server.start(THREAD1, XID1, XAResource.TMNOFLAGS, 100, false);
server.begin(THREAD2);
assertEquals(2, server.getTransactions().size());
server.commit(THREAD2);
assertEquals(1, server.getTransactions().size());
Transaction t = server.getTransactions().iterator().next();
assertEquals(THREAD1, t.getAssociatedSession());
assertNotNull(t.getId());
}
Aggregations