Search in sources :

Example 1 with Transaction

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());
}
Also used : Transaction(org.teiid.adminapi.Transaction) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Transaction (org.teiid.adminapi.Transaction)1