use of org.kie.kogito.mongodb.transaction.AbstractTransactionManager in project kogito-runtimes by kiegroup.
the class KogitoProcessInstancesFactoryIT method test.
@Test
void test() {
AbstractTransactionManager transactionManager = mock(AbstractTransactionManager.class);
AbstractProcessInstancesFactory factory = new AbstractProcessInstancesFactory(getMongoClient(), DB_NAME, false, transactionManager) {
};
assertNotNull(factory);
Process<?> process = mock(Process.class);
lenient().when(process.id()).thenReturn(PROCESS_NAME);
lenient().when(process.name()).thenReturn(PROCESS_NAME);
MongoDBProcessInstances<?> instance = factory.createProcessInstances(process);
assertNotNull(instance);
}
use of org.kie.kogito.mongodb.transaction.AbstractTransactionManager in project kogito-runtimes by kiegroup.
the class MongoDBProcessInstancesIT method testValuesReadMode.
@Test
void testValuesReadMode() {
AbstractTransactionManager transactionManager = new AbstractTransactionManager(mongoClient, false) {
};
testValuesReadMode(transactionManager);
}
use of org.kie.kogito.mongodb.transaction.AbstractTransactionManager in project kogito-runtimes by kiegroup.
the class MongoDBProcessInstancesIT method testFindByIdReadModeWithTransaction.
@Test
void testFindByIdReadModeWithTransaction() {
AbstractTransactionManager transactionManager = new AbstractTransactionManager(mongoClient, true) {
};
transactionManager.onBeforeStartEvent(new UnitOfWorkStartEvent(null));
testFindByIdReadMode(transactionManager);
transactionManager.onAfterEndEvent(new UnitOfWorkEndEvent(null));
}
use of org.kie.kogito.mongodb.transaction.AbstractTransactionManager in project kogito-runtimes by kiegroup.
the class MongoDBProcessInstancesIT method testFindByIdReadMode.
@Test
void testFindByIdReadMode() {
AbstractTransactionManager transactionManager = new AbstractTransactionManager(mongoClient, false) {
};
testFindByIdReadMode(transactionManager);
}
use of org.kie.kogito.mongodb.transaction.AbstractTransactionManager in project kogito-runtimes by kiegroup.
the class MongoDBProcessInstancesIT method testValuesReadModeWithTransaction.
@Test
void testValuesReadModeWithTransaction() {
AbstractTransactionManager transactionManager = new AbstractTransactionManager(mongoClient, true) {
};
transactionManager.onBeforeStartEvent(new UnitOfWorkStartEvent(null));
testValuesReadMode(transactionManager);
transactionManager.onAfterEndEvent(new UnitOfWorkEndEvent(null));
}
Aggregations