Skip to content

Commit 9a20e65

Browse files
committed
chore(IT): add missing historyLvl test annotations
related to #146
1 parent c95a355 commit 9a20e65

11 files changed

+59
-5
lines changed

engine/src/test/java/org/camunda/bpm/engine/test/api/authorization/ProcessInstanceCommentAuthorizationTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@
2525
import java.util.Collections;
2626
import java.util.List;
2727
import org.camunda.bpm.engine.AuthorizationException;
28+
import org.camunda.bpm.engine.ProcessEngineConfiguration;
2829
import org.camunda.bpm.engine.task.Comment;
2930
import org.camunda.bpm.engine.test.Deployment;
31+
import org.camunda.bpm.engine.test.RequiredHistoryLevel;
3032
import org.junit.Test;
3133

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

engine/src/test/java/org/camunda/bpm/engine/test/api/authorization/TaskCommentAuthorizationTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,15 @@
2626
import java.util.Collections;
2727
import java.util.List;
2828
import org.camunda.bpm.engine.AuthorizationException;
29+
import org.camunda.bpm.engine.ProcessEngineConfiguration;
2930
import org.camunda.bpm.engine.runtime.ProcessInstance;
3031
import org.camunda.bpm.engine.task.Comment;
3132
import org.camunda.bpm.engine.task.Task;
3233
import org.camunda.bpm.engine.test.Deployment;
34+
import org.camunda.bpm.engine.test.RequiredHistoryLevel;
3335
import org.junit.Test;
3436

37+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
3538
public class TaskCommentAuthorizationTest extends AuthorizationTest {
3639

3740
protected static final String PROCESS_KEY = "oneTaskProcess";

engine/src/test/java/org/camunda/bpm/engine/test/api/encoding/ProcessEngineCharacterEncodingTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
import java.util.Arrays;
2525
import java.util.Collection;
2626
import java.util.List;
27+
import org.camunda.bpm.engine.ProcessEngineConfiguration;
2728
import org.camunda.bpm.engine.TaskService;
2829
import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
2930
import org.camunda.bpm.engine.task.Comment;
3031
import org.camunda.bpm.engine.task.Task;
32+
import org.camunda.bpm.engine.test.RequiredHistoryLevel;
3133
import org.camunda.bpm.engine.test.util.ProvidedProcessEngineRule;
3234
import org.junit.After;
3335
import org.junit.Before;
@@ -38,6 +40,7 @@
3840
import org.junit.runners.Parameterized.Parameter;
3941
import org.junit.runners.Parameterized.Parameters;
4042

43+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
4144
@RunWith(Parameterized.class)
4245
public class ProcessEngineCharacterEncodingTest {
4346

engine/src/test/java/org/camunda/bpm/engine/test/api/form/FormServiceTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ public void testSubmitTaskFormForCmmnHumanTask() {
625625
.putValueTyped("object", objectValue(serializedValue).create()));
626626
}
627627

628-
629628
@Deployment
630629
@Test
631630
public void testSubmitStartFormWithBusinessKey() {
@@ -686,7 +685,6 @@ public void testSubmitStartFormWithExecutionListenerOnStartEvent() {
686685
assertThat(variableEvents.get(1)).containsExactly(entry("foo", "bar"));
687686
}
688687

689-
690688
@Test
691689
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_FULL)
692690
public void testSubmitStartFormWithAsyncStartEvent() {
@@ -715,7 +713,6 @@ public void testSubmitStartFormWithAsyncStartEvent() {
715713
assertThat(historicVariable.getValue()).isEqualTo("bar");
716714
}
717715

718-
719716
@Test
720717
public void testSubmitStartFormWithAsyncStartEventExecuteJob() {
721718
// given
@@ -1215,8 +1212,6 @@ public Boolean execute(CommandContext commandContext) {
12151212
assertThat(hasLoadedAnyVariables).isFalse();
12161213
}
12171214

1218-
1219-
12201215
@Test
12211216
@Deployment(resources = "org/camunda/bpm/engine/test/api/twoTasksProcess.bpmn20.xml")
12221217
public void testSubmitTaskFormWithVarialbesInReturnShouldDeserializeObjectValue()
@@ -1659,6 +1654,7 @@ public void testGetDeployedTaskFormWithWrongKeyFormat() {
16591654
}
16601655
}
16611656

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

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

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

1721+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
17231722
@Deployment(resources = {
17241723
"org/camunda/bpm/engine/test/api/form/FormServiceTest.shouldSubmitTaskFormUsingFormRefAndCamundaFormDefinition.bpmn",
17251724
"org/camunda/bpm/engine/test/api/form/task.form" })

engine/src/test/java/org/camunda/bpm/engine/test/api/runtime/CorrelateAllMessageBatchTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ public void shouldCorrelateAllWithInstanceQuery() {
190190
assertThat(taskExecutionQueryInstanceThree.count()).isEqualTo(0L);
191191
}
192192

193+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
193194
@Test
194195
public void shouldCorrelateAllWithHistoricInstanceQuery() {
195196
// given

engine/src/test/java/org/camunda/bpm/engine/test/api/runtime/ModificationExecutionAsyncTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ public void testBatchExecutionFailureWithMissingProcessInstance() {
858858
assertThat(failedJob.getExceptionMessage()).contains("Process instance '" + deletedProcessInstanceId + "' cannot be modified");
859859
}
860860

861+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
861862
@Test
862863
public void testBatchExecutionFailureWithHistoricQueryThatMatchesDeletedInstance() {
863864
DeploymentWithDefinitions deployment = testRule.deploy(instance);
@@ -913,6 +914,7 @@ public void testBatchExecutionFailureWithHistoricQueryThatMatchesDeletedInstance
913914
assertThat(failedJob.getExceptionMessage()).contains("Process instance '" + deletedProcessInstanceId + "' cannot be modified");
914915
}
915916

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

992+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
990993
@Test
991994
public void testBatchCreationWithHistoricProcessInstanceQuery() {
992995
int processInstanceCount = 15;
@@ -1145,6 +1148,7 @@ public void testBatchCreationWithOverlappingProcessInstanceIdsAndQuery() {
11451148
assertBatchCreated(batch, processInstanceCount);
11461149
}
11471150

1151+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
11481152
@Test
11491153
public void testBatchCreationWithOverlappingProcessInstanceIdsAndHistoricQuery() {
11501154
int processInstanceCount = 15;
@@ -1167,6 +1171,7 @@ public void testBatchCreationWithOverlappingProcessInstanceIdsAndHistoricQuery()
11671171
assertBatchCreated(batch, processInstanceCount);
11681172
}
11691173

1174+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
11701175
@Test
11711176
public void testBatchCreationWithOverlappingHistoricQueryAndQuery() {
11721177
// given

engine/src/test/java/org/camunda/bpm/engine/test/api/runtime/SetVariablesBatchTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ public void setVariablesAsyncOnCompletedProcessInstanceWithQuery() {
770770
batchRule.syncExec(batch);
771771
}
772772

773+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
773774
@Test
774775
public void setVariablesAsyncOnCompletedProcessInstanceWithHistoricQuery() {
775776
// given set variables on completed process instance

engine/src/test/java/org/camunda/bpm/engine/test/api/task/TaskLastUpdatedTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.util.List;
2323
import org.assertj.core.api.Assertions;
2424
import org.camunda.bpm.engine.OptimisticLockingException;
25+
import org.camunda.bpm.engine.ProcessEngineConfiguration;
2526
import org.camunda.bpm.engine.RuntimeService;
2627
import org.camunda.bpm.engine.TaskService;
2728
import org.camunda.bpm.engine.impl.db.sql.DbSqlSessionFactory;
@@ -34,6 +35,7 @@
3435
import org.camunda.bpm.engine.task.Task;
3536
import org.camunda.bpm.engine.test.Deployment;
3637
import org.camunda.bpm.engine.test.ProcessEngineRule;
38+
import org.camunda.bpm.engine.test.RequiredHistoryLevel;
3739
import org.camunda.bpm.engine.test.util.ProvidedProcessEngineRule;
3840
import org.junit.After;
3941
import org.junit.Before;
@@ -180,6 +182,7 @@ public void shouldSetLastUpdatedOnVariableChange() {
180182
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
181183
}
182184

185+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
183186
@Test
184187
public void shouldSetLastUpdatedOnCreateAttachment() {
185188
// given
@@ -196,6 +199,7 @@ public void shouldSetLastUpdatedOnCreateAttachment() {
196199
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
197200
}
198201

202+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
199203
@Test
200204
public void shouldSetLastUpdatedOnChangeAttachment() {
201205
// given
@@ -231,6 +235,7 @@ public void shouldSetLastUpdatedOnDeleteAttachment() {
231235
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
232236
}
233237

238+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
234239
@Test
235240
public void shouldSetLastUpdatedOnDeleteTaskAttachment() {
236241
// given
@@ -248,6 +253,7 @@ public void shouldSetLastUpdatedOnDeleteTaskAttachment() {
248253
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
249254
}
250255

256+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
251257
@Test
252258
public void shouldSetLastUpdatedOnComment() {
253259
// given
@@ -403,6 +409,7 @@ public void shouldSetLastUpdatedOnSubmitTaskForm() {
403409
assertThat(taskResult.getLastUpdated()).isAfter(beforeSubmit);
404410
}
405411

412+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
406413
@Test
407414
public void shouldNotSaveTaskConcurrentlyUpdatedByDependentEntity() {
408415
// given
@@ -415,6 +422,7 @@ public void shouldNotSaveTaskConcurrentlyUpdatedByDependentEntity() {
415422
.isInstanceOf(OptimisticLockingException.class);
416423
}
417424

425+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
418426
@Test
419427
public void shouldSetLastUpdatedOnTaskDeleteComment() {
420428
// given
@@ -433,6 +441,7 @@ public void shouldSetLastUpdatedOnTaskDeleteComment() {
433441
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
434442
}
435443

444+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
436445
@Test
437446
public void shouldSetLastUpdatedOnTaskDeleteComments() {
438447
// given
@@ -452,6 +461,7 @@ public void shouldSetLastUpdatedOnTaskDeleteComments() {
452461
assertThat(taskResult.getLastUpdated()).isAfter(beforeUpdate);
453462
}
454463

464+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
455465
@Test
456466
public void shouldSetLastUpdatedOnTaskCommentUpdate() {
457467
// given
@@ -501,6 +511,7 @@ public void shouldSetLastUpdatedOnProcessInstanceDeleteComments() {
501511
assertThat(taskResult.getLastUpdated()).isNull();
502512
}
503513

514+
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_ACTIVITY)
504515
@Test
505516
public void shouldSetLastUpdatedOnProcessInstanceCommentUpdate() {
506517
// given

0 commit comments

Comments
 (0)