Skip to content

Commit

Permalink
test(protocol-jackson): create test cases for nullable variable value
Browse files Browse the repository at this point in the history
  • Loading branch information
aivinog1 committed May 31, 2022
1 parent b1cf5c2 commit 796edd2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Expand Up @@ -441,6 +441,18 @@ final var record = new DeploymentDistributionRecord();
"{'type':'','processDefinitionVersion':-1,'elementId':'','bpmnProcessId':'','processDefinitionKey':-1,'processInstanceKey':-1,'elementInstanceKey':-1,'variables':{},'worker':'','retries':-1,'retryBackoff':0,'recurringTime':-1,'errorMessage':'','errorCode':'','customHeaders':{},'deadline':-1}"
},
/////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////// JobRecord with nullable variable //////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
{
"JobRecordWithNullableVariable",
(Supplier<UnifiedRecordValue>)
() ->
new JobRecord()
.setVariables(
new UnsafeBuffer(MsgPackConverter.convertToMsgPack("{'foo':null}"))),
"{'type':'','errorMessage':'','bpmnProcessId':'','processDefinitionKey':-1,'processInstanceKey':-1,'elementId':'','elementInstanceKey':-1,'variables':{'foo':null},'deadline':-1,'worker':'','retries':-1,'retryBackoff':0,'recurringTime':-1,'errorCode':'','processDefinitionVersion':-1,'customHeaders':{}}"
},
/////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////// MessageRecord /////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
{
Expand Down
Expand Up @@ -59,6 +59,7 @@ public static void performSampleWorkload(final ZeebeClient client) {
variables.put("orderId", "foo-bar-123");
variables.put("largeValue", "x".repeat(8192));
variables.put("unicode", "Á");
variables.put("nullable", null);

final long processInstanceKey =
client
Expand Down

0 comments on commit 796edd2

Please sign in to comment.