Skip to content

Commit

Permalink
Adjust CMMN EventSubscriptionResourceTest to use a specific tenant id…
Browse files Browse the repository at this point in the history
… for the case instance
  • Loading branch information
filiphr committed Aug 2, 2024
1 parent 1104308 commit 96251b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ public void testQueryEventSubscriptions() throws Exception {

@CmmnDeployment(resources = { "org/flowable/cmmn/rest/service/api/runtime/signalEventListener.cmmn" })
public void testGetEventSubscription() throws Exception {
runtimeService.createCaseInstanceBuilder().caseDefinitionKey("testSimpleEnableTask").start();
runtimeService.createCaseInstanceBuilder()
.caseDefinitionKey("testSimpleEnableTask")
.overrideCaseDefinitionTenantId("acme")
.start();
EventSubscription eventSubscription = runtimeService.createEventSubscriptionQuery().singleResult();

String url = CmmnRestUrls.createRelativeResourceUrl(CmmnRestUrls.URL_EVENT_SUBSCRIPTION, eventSubscription.getId());
Expand All @@ -108,7 +111,7 @@ public void testGetEventSubscription() throws Exception {
+ "caseInstanceId: '" + eventSubscription.getScopeId() + "',"
+ "caseDefinitionId: '" + eventSubscription.getScopeDefinitionId() + "',"
+ "created: " + new TextNode(getISODateStringWithTZ(eventSubscription.getCreated())) + ","
+ "tenantId: ''"
+ "tenantId: 'acme'"
+ "}");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void testGetProcessAdhoc() throws Exception {
*/
public void testUpdateTaskNoOverrides() throws Exception {
try {
Instant now = Instant.now();
Instant now = Instant.now().truncatedTo(ChronoUnit.SECONDS);
Task parentTask = taskService.newTask();
taskService.saveTask(parentTask);

Expand Down Expand Up @@ -234,7 +234,7 @@ public void testUpdateTask() throws Exception {

ObjectNode requestNode = objectMapper.createObjectNode();

Instant dueDate = Instant.now();
Instant dueDate = Instant.now().truncatedTo(ChronoUnit.SECONDS);
String dueDateString = getISODateString(Date.from(dueDate));

requestNode.put("name", "New task name");
Expand Down

0 comments on commit 96251b7

Please sign in to comment.