Skip to content

Commit

Permalink
merge: #12719
Browse files Browse the repository at this point in the history
12719: [Backport stable/8.2] Fix flaky `EmbeddedSubProcessTest` r=remcowesterhoud a=backport-action

# Description
Backport of #12697 to `stable/8.2`.

relates to #11844

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
  • Loading branch information
zeebe-bors-camunda[bot] and remcowesterhoud committed May 9, 2023
2 parents cd4b39d + df20c9e commit c8c84a6
Showing 1 changed file with 10 additions and 4 deletions.
Expand Up @@ -18,6 +18,7 @@
import io.camunda.zeebe.protocol.impl.record.value.message.MessageRecord;
import io.camunda.zeebe.protocol.record.ValueType;
import io.camunda.zeebe.protocol.record.intent.MessageIntent;
import io.camunda.zeebe.protocol.record.intent.MessageSubscriptionIntent;
import io.camunda.zeebe.protocol.record.intent.ProcessEventIntent;
import io.camunda.zeebe.protocol.record.intent.ProcessInstanceIntent;
import io.camunda.zeebe.protocol.record.value.BpmnElementType;
Expand Down Expand Up @@ -95,10 +96,15 @@ public void shouldNotTriggerBoundaryEventWhenFlowscopeIsInterrupted() {
.withVariable("correlationKey", "correlationKey")
.create();

RecordingExporter.processInstanceRecords(ProcessInstanceIntent.ELEMENT_ACTIVATED)
.withProcessInstanceKey(processInstanceKey)
.withElementId("task")
.await();
assertThat(
RecordingExporter.messageSubscriptionRecords(MessageSubscriptionIntent.CREATED)
.withProcessInstanceKey(processInstanceKey)
.limit(2))
.describedAs(
"The 2 message subscriptions must be created before we publish the "
+ "messages. As the messages have a TTL of 0 seconds")
.describedAs("")
.hasSize(2);

// when
// We need to make sure no records are written in between the publish commands. This could
Expand Down

0 comments on commit c8c84a6

Please sign in to comment.