Search in sources :

Example 6 with UnitOfWorkAbortEvent

use of org.kie.kogito.uow.events.UnitOfWorkAbortEvent in project kogito-runtimes by kiegroup.

the class AbstractTransactionManagerTest method onAfterAbortEvent.

@Test
void onAfterAbortEvent() {
    manager.onBeforeStartEvent(new UnitOfWorkStartEvent(null));
    manager.onAfterAbortEvent(new UnitOfWorkAbortEvent(null));
    verify(clientSession, times(1)).abortTransaction();
    verify(clientSession, times(1)).close();
}
Also used : UnitOfWorkStartEvent(org.kie.kogito.uow.events.UnitOfWorkStartEvent) UnitOfWorkAbortEvent(org.kie.kogito.uow.events.UnitOfWorkAbortEvent) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)6 UnitOfWorkAbortEvent (org.kie.kogito.uow.events.UnitOfWorkAbortEvent)6 UnitOfWorkStartEvent (org.kie.kogito.uow.events.UnitOfWorkStartEvent)6 MongoDatabase (com.mongodb.client.MongoDatabase)2 Document (org.bson.Document)2