提交 a63b83e4 编写于 作者: J Joram Barrez

QA fix for mysql

上级 f6a1575a
......@@ -181,11 +181,11 @@ create table ACT_EVT_LOG (
PROC_INST_ID_ varchar(64),
EXECUTION_ID_ varchar(64),
TASK_ID_ varchar(64),
TIME_STAMP_ datetime(3) not null,
TIME_STAMP_ timestamp(3) not null,
USER_ID_ varchar(255),
DATA_ LONGBLOB,
LOCK_OWNER_ varchar(255),
LOCK_TIME_ datetime(3) null,
LOCK_TIME_ timestamp(3) null,
IS_PROCESSED_ tinyint default 0,
primary key (LOG_NR_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
......
......@@ -11,11 +11,11 @@ create table ACT_EVT_LOG (
PROC_INST_ID_ varchar(64),
EXECUTION_ID_ varchar(64),
TASK_ID_ varchar(64),
TIME_STAMP_ datetime(3) not null,
TIME_STAMP_ timestamp(3) not null,
USER_ID_ varchar(255),
DATA_ LONGBLOB,
LOCK_OWNER_ varchar(255),
LOCK_TIME_ datetime(3) null,
LOCK_TIME_ timestamp(3) null,
IS_PROCESSED_ tinyint default 0,
primary key (LOG_NR_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
......
......@@ -2,6 +2,7 @@ package org.activiti.engine.test.api.event;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
......@@ -12,6 +13,7 @@ import org.activiti.engine.impl.event.logger.handler.Fields;
import org.activiti.engine.impl.identity.Authentication;
import org.activiti.engine.impl.test.PluggableActivitiTestCase;
import org.activiti.engine.impl.util.CollectionUtil;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.activiti.engine.test.Deployment;
......@@ -52,10 +54,21 @@ public class DatabaseEventLoggerTest extends PluggableActivitiTestCase {
public void testDatabaseEvents() throws JsonParseException, JsonMappingException, IOException {
// Run process to gather data
runtimeService.startProcessInstanceByKey("DatabaseEventLoggerProcess", CollectionUtil.singletonMap("testVar", "helloWorld"));
ProcessInstance processInstance =
runtimeService.startProcessInstanceByKey("DatabaseEventLoggerProcess", CollectionUtil.singletonMap("testVar", "helloWorld"));
// Verify event log entries
List<EventLogEntry> eventLogEntries = managementService.getEventLogEntries(null, null);
String processDefinitionId = processInstance.getProcessDefinitionId();
Iterator<EventLogEntry> iterator = eventLogEntries.iterator();
while (iterator.hasNext()) {
EventLogEntry entry = iterator.next();
if (entry.getProcessDefinitionId() != null && !entry.getProcessDefinitionId().equals(processDefinitionId)) {
iterator.remove();
}
}
assertEquals(15, eventLogEntries.size());
long lastLogNr = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册