diff --git a/qa/src/test/java/io/camunda/zeebe/process/test/qa/abstracts/assertions/AbstractMessageAssertTest.java b/qa/src/test/java/io/camunda/zeebe/process/test/qa/abstracts/assertions/AbstractMessageAssertTest.java index 8d487f97..ef598282 100644 --- a/qa/src/test/java/io/camunda/zeebe/process/test/qa/abstracts/assertions/AbstractMessageAssertTest.java +++ b/qa/src/test/java/io/camunda/zeebe/process/test/qa/abstracts/assertions/AbstractMessageAssertTest.java @@ -116,7 +116,12 @@ void testHasExpired() throws InterruptedException, TimeoutException { // when final PublishMessageResponse response = Utilities.sendMessage( - engine, client, ProcessPackMessageEvent.MESSAGE_NAME, CORRELATION_KEY, timeToLive); + engine, + client, + ProcessPackMessageEvent.MESSAGE_NAME, + CORRELATION_KEY, + timeToLive, + Collections.emptyMap()); Utilities.increaseTime(engine, timeToLive.plusMinutes(1)); // then @@ -285,7 +290,12 @@ void testHasNotExpiredFailure() throws InterruptedException, TimeoutException { // when final PublishMessageResponse response = Utilities.sendMessage( - engine, client, ProcessPackMessageEvent.MESSAGE_NAME, CORRELATION_KEY, timeToLive); + engine, + client, + ProcessPackMessageEvent.MESSAGE_NAME, + CORRELATION_KEY, + timeToLive, + Collections.emptyMap()); Utilities.increaseTime(engine, timeToLive.plusMinutes(1)); // then diff --git a/qa/src/test/java/io/camunda/zeebe/process/test/qa/util/Utilities.java b/qa/src/test/java/io/camunda/zeebe/process/test/qa/util/Utilities.java index 189803e0..8ee5a027 100644 --- a/qa/src/test/java/io/camunda/zeebe/process/test/qa/util/Utilities.java +++ b/qa/src/test/java/io/camunda/zeebe/process/test/qa/util/Utilities.java @@ -29,6 +29,7 @@ import io.camunda.zeebe.protocol.record.intent.JobIntent; import io.camunda.zeebe.protocol.record.value.JobRecordValue; import java.time.Duration; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -122,7 +123,8 @@ public static PublishMessageResponse sendMessage( final String messageName, final String correlationKey) throws InterruptedException, TimeoutException { - return sendMessage(engine, client, messageName, correlationKey, Duration.ofMinutes(1)); + return sendMessage( + engine, client, messageName, correlationKey, Duration.ofMinutes(1), Collections.emptyMap()); } public static PublishMessageResponse sendMessage( @@ -130,7 +132,19 @@ public static PublishMessageResponse sendMessage( final ZeebeClient client, final String messageName, final String correlationKey, - final Duration timeToLive) + final Map variables) + throws InterruptedException, TimeoutException { + return sendMessage( + engine, client, messageName, correlationKey, Duration.ofMinutes(1), variables); + } + + public static PublishMessageResponse sendMessage( + final ZeebeTestEngine engine, + final ZeebeClient client, + final String messageName, + final String correlationKey, + final Duration timeToLive, + final Map variables) throws InterruptedException, TimeoutException { final PublishMessageResponse response = client @@ -138,6 +152,7 @@ public static PublishMessageResponse sendMessage( .messageName(messageName) .correlationKey(correlationKey) .timeToLive(timeToLive) + .variables(variables) .send() .join(); waitForIdleState(engine, Duration.ofSeconds(1));