Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,24 @@ pipeline {
])
}
}
stage('engine-UNIT-historylevel-none') {
when {
expression {
cambpmWithLabels('default-build')
}
}
steps {
cambpmConditionalRetry([
agentLabel: 'h2',
runSteps: {
cambpmRunMaven('engine/', 'verify -Pcfghistorynone', runtimeStash: true, jdkVersion: 'jdk-17-latest')
},
postFailure: {
cambpmPublishTestResult()
}
])
}
}
stage('quarkus-UNIT') {
when {
expression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@
import java.util.Collections;
import java.util.List;
import org.camunda.bpm.engine.AuthorizationException;
import org.camunda.bpm.engine.ProcessEngineConfiguration;
import org.camunda.bpm.engine.task.Comment;
import org.camunda.bpm.engine.test.Deployment;
import org.camunda.bpm.engine.test.RequiredHistoryLevel;
import org.junit.Test;

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
public class ProcessInstanceCommentAuthorizationTest extends AuthorizationTest {
protected static final String ONE_TASK_PROCESS_KEY = "oneTaskProcess";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@
import java.util.Collections;
import java.util.List;
import org.camunda.bpm.engine.AuthorizationException;
import org.camunda.bpm.engine.ProcessEngineConfiguration;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.camunda.bpm.engine.task.Comment;
import org.camunda.bpm.engine.task.Task;
import org.camunda.bpm.engine.test.Deployment;
import org.camunda.bpm.engine.test.RequiredHistoryLevel;
import org.junit.Test;

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
public class TaskCommentAuthorizationTest extends AuthorizationTest {

protected static final String PROCESS_KEY = "oneTaskProcess";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.camunda.bpm.engine.ProcessEngineConfiguration;
import org.camunda.bpm.engine.TaskService;
import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.camunda.bpm.engine.task.Comment;
import org.camunda.bpm.engine.task.Task;
import org.camunda.bpm.engine.test.RequiredHistoryLevel;
import org.camunda.bpm.engine.test.util.ProvidedProcessEngineRule;
import org.junit.After;
import org.junit.Before;
Expand All @@ -38,6 +40,7 @@
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@RunWith(Parameterized.class)
public class ProcessEngineCharacterEncodingTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,6 @@ public void testSubmitTaskFormForCmmnHumanTask() {
.putValueTyped("object", objectValue(serializedValue).create()));
}


@Deployment
@Test
public void testSubmitStartFormWithBusinessKey() {
Expand Down Expand Up @@ -686,7 +685,6 @@ public void testSubmitStartFormWithExecutionListenerOnStartEvent() {
assertThat(variableEvents.get(1)).containsExactly(entry("foo", "bar"));
}


@Test
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_FULL)
public void testSubmitStartFormWithAsyncStartEvent() {
Expand Down Expand Up @@ -715,7 +713,6 @@ public void testSubmitStartFormWithAsyncStartEvent() {
assertThat(historicVariable.getValue()).isEqualTo("bar");
}


@Test
public void testSubmitStartFormWithAsyncStartEventExecuteJob() {
// given
Expand Down Expand Up @@ -1215,8 +1212,6 @@ public Boolean execute(CommandContext commandContext) {
assertThat(hasLoadedAnyVariables).isFalse();
}



@Test
@Deployment(resources = "org/camunda/bpm/engine/test/api/twoTasksProcess.bpmn20.xml")
public void testSubmitTaskFormWithVarialbesInReturnShouldDeserializeObjectValue()
Expand Down Expand Up @@ -1659,6 +1654,7 @@ public void testGetDeployedTaskFormWithWrongKeyFormat() {
}
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Deployment(resources = {
"org/camunda/bpm/engine/test/api/form/FormServiceTest.shouldSubmitStartFormUsingFormKeyAndCamundaFormDefinition.bpmn",
"org/camunda/bpm/engine/test/api/form/start.form" })
Expand All @@ -1679,6 +1675,7 @@ public void shouldSubmitStartFormUsingFormKeyAndCamundaFormDefinition() {
assertThat(historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstance.getId()).list()).hasSize(1);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Deployment(resources = {
"org/camunda/bpm/engine/test/api/form/FormServiceTest.shouldSubmitTaskFormUsingFormKeyAndCamundaFormDefinition.bpmn",
"org/camunda/bpm/engine/test/api/form/task.form" })
Expand All @@ -1699,6 +1696,7 @@ public void shouldSubmitTaskFormUsingFormKeyAndCamundaFormDefinition() {
assertThat(taskService.createTaskQuery().list()).hasSize(0);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Deployment(resources = {
"org/camunda/bpm/engine/test/api/form/FormServiceTest.shouldSubmitStartFormUsingFormRefAndCamundaFormDefinition.bpmn",
"org/camunda/bpm/engine/test/api/form/start.form" })
Expand All @@ -1720,6 +1718,7 @@ public void shouldSubmitStartFormUsingFormRefAndCamundaFormDefinition() {
assertThat(historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstance.getId()).list()).hasSize(1);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Deployment(resources = {
"org/camunda/bpm/engine/test/api/form/FormServiceTest.shouldSubmitTaskFormUsingFormRefAndCamundaFormDefinition.bpmn",
"org/camunda/bpm/engine/test/api/form/task.form" })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ public void shouldCorrelateAllWithInstanceQuery() {
assertThat(taskExecutionQueryInstanceThree.count()).isEqualTo(0L);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldCorrelateAllWithHistoricInstanceQuery() {
// given
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ public void testBatchExecutionFailureWithMissingProcessInstance() {
assertThat(failedJob.getExceptionMessage()).contains("Process instance '" + deletedProcessInstanceId + "' cannot be modified");
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void testBatchExecutionFailureWithHistoricQueryThatMatchesDeletedInstance() {
DeploymentWithDefinitions deployment = testRule.deploy(instance);
Expand Down Expand Up @@ -913,6 +914,7 @@ public void testBatchExecutionFailureWithHistoricQueryThatMatchesDeletedInstance
assertThat(failedJob.getExceptionMessage()).contains("Process instance '" + deletedProcessInstanceId + "' cannot be modified");
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.syncAfterOneTaskProcess.bpmn20.xml" })
public void testBatchExecutionWithHistoricQueryUnfinished() {
Expand Down Expand Up @@ -987,6 +989,7 @@ public void testBatchCreationWithProcessInstanceQuery() {
assertBatchCreated(batch, processInstanceCount);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void testBatchCreationWithHistoricProcessInstanceQuery() {
int processInstanceCount = 15;
Expand Down Expand Up @@ -1063,7 +1066,7 @@ public void testBatchExecutionFailureWithFinishedInstanceId() {
assertThat(failedJob.getExceptionMessage()).contains("Process instance '" + completedProcessInstanceId + "' cannot be modified");
}


@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.syncAfterOneTaskProcess.bpmn20.xml" })
public void testBatchExecutionFailureWithHistoricQueryThatMatchesFinishedInstance() {
Expand Down Expand Up @@ -1145,6 +1148,7 @@ public void testBatchCreationWithOverlappingProcessInstanceIdsAndQuery() {
assertBatchCreated(batch, processInstanceCount);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void testBatchCreationWithOverlappingProcessInstanceIdsAndHistoricQuery() {
int processInstanceCount = 15;
Expand All @@ -1167,6 +1171,7 @@ public void testBatchCreationWithOverlappingProcessInstanceIdsAndHistoricQuery()
assertBatchCreated(batch, processInstanceCount);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void testBatchCreationWithOverlappingHistoricQueryAndQuery() {
// given
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.List;

import org.camunda.bpm.engine.HistoryService;
import org.camunda.bpm.engine.ProcessEngineConfiguration;
import org.camunda.bpm.engine.ProcessEngineException;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.history.HistoricProcessInstanceQuery;
Expand All @@ -41,6 +42,7 @@
import org.camunda.bpm.engine.runtime.ProcessInstanceQuery;
import org.camunda.bpm.engine.task.Task;
import org.camunda.bpm.engine.test.ProcessEngineRule;
import org.camunda.bpm.engine.test.RequiredHistoryLevel;
import org.camunda.bpm.engine.test.util.ProcessEngineTestRule;
import org.camunda.bpm.engine.test.util.ProvidedProcessEngineRule;
import org.camunda.bpm.model.bpmn.Bpmn;
Expand Down Expand Up @@ -102,6 +104,7 @@ public void createSimpleModificationPlan() {
}
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void createSimpleModificationPlanWithHistoricQuery() {
ProcessDefinition processDefinition = testRule.deployAndGetDefinition(instance);
Expand Down Expand Up @@ -138,6 +141,7 @@ public void createSimpleModificationPlanWithIdenticalRuntimeAndHistoryQuery() {
}
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void createSimpleModificationPlanWithComplementaryRuntimeAndHistoryQueries() {
ProcessDefinition processDefinition = testRule.deployAndGetDefinition(instance);
Expand All @@ -157,6 +161,7 @@ public void createSimpleModificationPlanWithComplementaryRuntimeAndHistoryQuerie
}
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void createSimpleModificationPlanWithHistoricQueryUnfinished() {
ProcessDefinition processDefinition = testRule.deployAndGetDefinition(instance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,7 @@ public void setVariablesAsyncOnCompletedProcessInstanceWithQuery() {
batchRule.syncExec(batch);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void setVariablesAsyncOnCompletedProcessInstanceWithHistoricQuery() {
// given set variables on completed process instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.List;
import org.assertj.core.api.Assertions;
import org.camunda.bpm.engine.OptimisticLockingException;
import org.camunda.bpm.engine.ProcessEngineConfiguration;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.TaskService;
import org.camunda.bpm.engine.impl.db.sql.DbSqlSessionFactory;
Expand All @@ -34,6 +35,7 @@
import org.camunda.bpm.engine.task.Task;
import org.camunda.bpm.engine.test.Deployment;
import org.camunda.bpm.engine.test.ProcessEngineRule;
import org.camunda.bpm.engine.test.RequiredHistoryLevel;
import org.camunda.bpm.engine.test.util.ProvidedProcessEngineRule;
import org.junit.After;
import org.junit.Before;
Expand Down Expand Up @@ -180,6 +182,7 @@ public void shouldSetLastUpdatedOnVariableChange() {
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldSetLastUpdatedOnCreateAttachment() {
// given
Expand All @@ -196,6 +199,7 @@ public void shouldSetLastUpdatedOnCreateAttachment() {
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldSetLastUpdatedOnChangeAttachment() {
// given
Expand Down Expand Up @@ -231,6 +235,7 @@ public void shouldSetLastUpdatedOnDeleteAttachment() {
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldSetLastUpdatedOnDeleteTaskAttachment() {
// given
Expand All @@ -248,6 +253,7 @@ public void shouldSetLastUpdatedOnDeleteTaskAttachment() {
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldSetLastUpdatedOnComment() {
// given
Expand Down Expand Up @@ -403,6 +409,7 @@ public void shouldSetLastUpdatedOnSubmitTaskForm() {
assertThat(taskResult.getLastUpdated()).isAfter(beforeSubmit);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldNotSaveTaskConcurrentlyUpdatedByDependentEntity() {
// given
Expand All @@ -415,6 +422,7 @@ public void shouldNotSaveTaskConcurrentlyUpdatedByDependentEntity() {
.isInstanceOf(OptimisticLockingException.class);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldSetLastUpdatedOnTaskDeleteComment() {
// given
Expand All @@ -433,6 +441,7 @@ public void shouldSetLastUpdatedOnTaskDeleteComment() {
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldSetLastUpdatedOnTaskDeleteComments() {
// given
Expand All @@ -452,6 +461,7 @@ public void shouldSetLastUpdatedOnTaskDeleteComments() {
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldSetLastUpdatedOnTaskCommentUpdate() {
// given
Expand All @@ -470,6 +480,7 @@ public void shouldSetLastUpdatedOnTaskCommentUpdate() {
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldSetLastUpdatedOnProcessInstanceDeleteComment() {
// given
Expand All @@ -485,6 +496,7 @@ public void shouldSetLastUpdatedOnProcessInstanceDeleteComment() {
assertThat(taskResult.getLastUpdated()).isNull();
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldSetLastUpdatedOnProcessInstanceDeleteComments() {
// given
Expand All @@ -501,6 +513,7 @@ public void shouldSetLastUpdatedOnProcessInstanceDeleteComments() {
assertThat(taskResult.getLastUpdated()).isNull();
}

@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
@Test
public void shouldSetLastUpdatedOnProcessInstanceCommentUpdate() {
// given
Expand Down
Loading