Skip to content

Commit

Permalink
fix(tests): fix DMN large payload test (#5629)
Browse files Browse the repository at this point in the history
* fix(test): fix large decision input/output test

Since 8.3.0 Zeebe reacts differently on JSON passed to DMN instead of String. Fixing payload to be string in our test.

* chore(tests): fix payload file
  • Loading branch information
sdorokhova committed Oct 30, 2023
1 parent 6fcde4c commit 75b83b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,6 @@ public void testPartitionIds() {
}

@Test
@Ignore("https://github.com/camunda/operate/pull/5524")
public void testDecisionInstanceEvaluatedWithBigInputAndOutput() throws Exception {
//given
final String bpmnProcessId = "process";
Expand All @@ -529,8 +528,8 @@ public void testDecisionInstanceEvaluatedWithBigInputAndOutput() throws Exceptio
.businessRuleTask(elementId, task -> task.zeebeCalledDecisionId(demoDecisionId2).zeebeResultVariable("result"))
.done();

String bigJSONVariablePayload = payloadUtil.readStringFromClasspath("/large-payload.json");
String payload = "{\"value\": " + bigJSONVariablePayload + "}";
String bigJSONVariablePayload = payloadUtil.readStringFromClasspath("/large-payload.txt");
String payload = "{\"value\": \"" + bigJSONVariablePayload + "\"}";
tester.deployProcess(instance, "test.bpmn").deployDecision("largeInputOutput.dmn").waitUntil().processIsDeployed()
.and().decisionsAreDeployed(1)
//when
Expand All @@ -544,9 +543,9 @@ public void testDecisionInstanceEvaluatedWithBigInputAndOutput() throws Exceptio

assertThat(decisionEntities).hasSize(1);
assertThat(decisionEntities.get(0).getEvaluatedInputs()).hasSize(1);
JSONAssert.assertEquals(decisionEntities.get(0).getEvaluatedInputs().get(0).getValue(), bigJSONVariablePayload, JSONCompareMode.LENIENT);
assertThat(decisionEntities.get(0).getEvaluatedInputs().get(0).getValue()).contains(bigJSONVariablePayload);
assertThat(decisionEntities.get(0).getEvaluatedOutputs()).hasSize(1);
JSONAssert.assertEquals(decisionEntities.get(0).getEvaluatedOutputs().get(0).getValue(), bigJSONVariablePayload, JSONCompareMode.LENIENT);
assertThat(decisionEntities.get(0).getEvaluatedOutputs().get(0).getValue()).contains(bigJSONVariablePayload);
}

@Test
Expand Down

0 comments on commit 75b83b1

Please sign in to comment.