diff --git a/qa/abstracts/src/main/java/io/camunda/zeebe/process/test/qa/abstracts/examples/AbstractPrCreatedTest.java b/qa/abstracts/src/main/java/io/camunda/zeebe/process/test/qa/abstracts/examples/AbstractPrCreatedTest.java
deleted file mode 100644
index 8d2bfc5a..00000000
--- a/qa/abstracts/src/main/java/io/camunda/zeebe/process/test/qa/abstracts/examples/AbstractPrCreatedTest.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright © 2021 camunda services GmbH (info@camunda.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.camunda.zeebe.process.test.qa.abstracts.examples;
-
-import static io.camunda.zeebe.process.test.assertions.BpmnAssert.assertThat;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.AUTOMATED_TESTS_PROCESS_ID;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.AUTOMATED_TESTS_RESOURCE_NAME;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.AUTOMATED_TESTS_RUN_TESTS;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.DEPLOY_SNAPSHOT;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.MAKE_CHANGES;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.MERGE_CODE;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.PR_CREATED_MSG;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.PR_ID_VAR;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.REMIND_REVIEWER;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.REQUEST_REVIEW;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.RESOURCE_NAME;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.REVIEW_RECEIVED_MSG;
-import static io.camunda.zeebe.process.test.qa.abstracts.util.Utilities.ProcessPackPRCreated.REVIEW_RESULT_VAR;
-
-import io.camunda.zeebe.client.ZeebeClient;
-import io.camunda.zeebe.client.api.response.DeploymentEvent;
-import io.camunda.zeebe.client.api.response.PublishMessageResponse;
-import io.camunda.zeebe.process.test.api.ZeebeTestEngine;
-import io.camunda.zeebe.process.test.qa.abstracts.util.Utilities;
-import java.time.Duration;
-import java.util.Collections;
-import java.util.concurrent.TimeoutException;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-/**
- * This is an abstract test class so we can test these tests with both our extensions (embedded and
- * testcontainer) without the need to duplicate our test code.
- *
- * Users would not do this. They would create a regular test class and annotate this with the
- * preferred annotation to include the extension they need.
- */
-public abstract class AbstractPrCreatedTest {
-
- private ZeebeTestEngine engine;
- private ZeebeClient client;
-
- @BeforeEach
- void deployProcesses() {
- // Normally these fields get injected by our annotation. Since we want to reuse these tests we
- // need to use these abstract methods to obtain them, as they get injected in the extending test
- // classes. Users would not need to do this.
- engine = getEngine();
- client = getClient();
-
- final DeploymentEvent deploymentEvent =
- Utilities.deployResources(client, RESOURCE_NAME, AUTOMATED_TESTS_RESOURCE_NAME);
- assertThat(deploymentEvent)
- .containsProcessesByResourceName(RESOURCE_NAME, AUTOMATED_TESTS_RESOURCE_NAME);
- }
-
- @Test
- void testPRCreateddHappyPath() throws InterruptedException, TimeoutException {
- // Given
- final String prId = "123";
- final PublishMessageResponse prCreatedResponse =
- Utilities.sendMessage(
- engine, client, PR_CREATED_MSG, "", Collections.singletonMap(PR_ID_VAR, prId));
-
- // When
- completeTask(REQUEST_REVIEW);
- Utilities.sendMessage(
- engine,
- client,
- REVIEW_RECEIVED_MSG,
- prId,
- Collections.singletonMap(REVIEW_RESULT_VAR, "approved"));
- completeTask(AUTOMATED_TESTS_RUN_TESTS);
- completeTask(AUTOMATED_TESTS_RUN_TESTS);
- completeTask(AUTOMATED_TESTS_RUN_TESTS);
- completeTask(MERGE_CODE);
- completeTask(DEPLOY_SNAPSHOT);
-
- // Then
- assertThat(prCreatedResponse)
- .hasCreatedProcessInstance()
- .extractingProcessInstance()
- .hasPassedElementsInOrder(REQUEST_REVIEW, MERGE_CODE, DEPLOY_SNAPSHOT)
- .hasNotPassedElement(REMIND_REVIEWER)
- .hasNotPassedElement(MAKE_CHANGES)
- .hasVariableWithValue(REVIEW_RESULT_VAR, "approved")
- .extractingLatestCalledProcess(AUTOMATED_TESTS_PROCESS_ID)
- .hasPassedElement(AUTOMATED_TESTS_RUN_TESTS, 3)
- .isCompleted();
- }
-
- @Test
- void testRemindReviewer() throws InterruptedException, TimeoutException {
- // Given
- final String prId = "123";
- final PublishMessageResponse prCreatedResponse =
- Utilities.sendMessage(
- engine, client, PR_CREATED_MSG, "", Collections.singletonMap(PR_ID_VAR, prId));
-
- // When
- completeTask(REQUEST_REVIEW);
- completeTask(AUTOMATED_TESTS_RUN_TESTS);
- completeTask(AUTOMATED_TESTS_RUN_TESTS);
- completeTask(AUTOMATED_TESTS_RUN_TESTS);
- Utilities.increaseTime(engine, Duration.ofDays(1));
- completeTask(REMIND_REVIEWER);
- Utilities.sendMessage(
- engine,
- client,
- REVIEW_RECEIVED_MSG,
- prId,
- Collections.singletonMap(REVIEW_RESULT_VAR, "approved"));
- completeTask(MERGE_CODE);
- completeTask(DEPLOY_SNAPSHOT);
-
- // Then
- assertThat(prCreatedResponse)
- .hasCreatedProcessInstance()
- .extractingProcessInstance()
- .hasPassedElementsInOrder(REQUEST_REVIEW, REMIND_REVIEWER, MERGE_CODE, DEPLOY_SNAPSHOT)
- .hasNotPassedElement(MAKE_CHANGES)
- .isCompleted();
- }
-
- @Test
- void testRejectReview() throws InterruptedException, TimeoutException {
- // Given
- final String prId = "123";
- final PublishMessageResponse prCreatedResponse =
- Utilities.sendMessage(
- engine, client, PR_CREATED_MSG, "", Collections.singletonMap(PR_ID_VAR, prId));
-
- // When
- completeTask(REQUEST_REVIEW);
- completeTask(AUTOMATED_TESTS_RUN_TESTS);
- completeTask(AUTOMATED_TESTS_RUN_TESTS);
- completeTask(AUTOMATED_TESTS_RUN_TESTS);
- Utilities.sendMessage(
- engine,
- client,
- REVIEW_RECEIVED_MSG,
- prId,
- Collections.singletonMap(REVIEW_RESULT_VAR, "rejected"));
- completeTask(MAKE_CHANGES);
- completeTask(REQUEST_REVIEW);
- Utilities.sendMessage(
- engine,
- client,
- REVIEW_RECEIVED_MSG,
- prId,
- Collections.singletonMap(REVIEW_RESULT_VAR, "approved"));
- completeTask(MERGE_CODE);
- completeTask(DEPLOY_SNAPSHOT);
-
- // Then
- assertThat(prCreatedResponse)
- .hasCreatedProcessInstance()
- .extractingProcessInstance()
- .hasPassedElementsInOrder(
- REQUEST_REVIEW, MAKE_CHANGES, REQUEST_REVIEW, MERGE_CODE, DEPLOY_SNAPSHOT)
- .hasNotPassedElement(REMIND_REVIEWER)
- .isCompleted();
- }
-
- private void completeTask(final String taskId) throws InterruptedException, TimeoutException {
- Utilities.completeTask(engine, client, taskId);
- }
-
- public abstract ZeebeClient getClient();
-
- public abstract ZeebeTestEngine getEngine();
-}
diff --git a/qa/abstracts/src/main/java/io/camunda/zeebe/process/test/qa/abstracts/util/Utilities.java b/qa/abstracts/src/main/java/io/camunda/zeebe/process/test/qa/abstracts/util/Utilities.java
index 662532d0..2cf9cc51 100644
--- a/qa/abstracts/src/main/java/io/camunda/zeebe/process/test/qa/abstracts/util/Utilities.java
+++ b/qa/abstracts/src/main/java/io/camunda/zeebe/process/test/qa/abstracts/util/Utilities.java
@@ -127,17 +127,6 @@ public static PublishMessageResponse sendMessage(
engine, client, messageName, correlationKey, Duration.ofMinutes(1), Collections.emptyMap());
}
- public static PublishMessageResponse sendMessage(
- final ZeebeTestEngine engine,
- final ZeebeClient client,
- final String messageName,
- final String correlationKey,
- 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,
@@ -270,24 +259,4 @@ public static final class ProcessPackStartEndEvent {
public static final String RESOURCE_NAME = "start-end.bpmn";
public static final String PROCESS_ID = "start-end";
}
-
- public static final class ProcessPackPRCreated {
-
- public static final String RESOURCE_NAME = "pr-created.bpmn";
- public static final String PROCESS_ID = "prCreatedProcess";
- public static final String PR_CREATED_MSG = "prCreated";
- public static final String REVIEW_RECEIVED_MSG = "reviewReceived";
- public static final String PR_ID_VAR = "prId";
- public static final String REVIEW_RESULT_VAR = "reviewResult";
- public static final String REQUEST_REVIEW = "requestReview";
- public static final String REMIND_REVIEWER = "remindReviewer";
- public static final String MAKE_CHANGES = "makeChanges";
- public static final String MERGE_CODE = "mergeCode";
- public static final String DEPLOY_SNAPSHOT = "deploySnapshot";
- public static final String TRIGGER_TESTS = "triggerTests";
-
- public static final String AUTOMATED_TESTS_RESOURCE_NAME = "automated-tests.bpmn";
- public static final String AUTOMATED_TESTS_PROCESS_ID = "automatedTestsProcess";
- public static final String AUTOMATED_TESTS_RUN_TESTS = "runTests";
- }
}
diff --git a/qa/embedded/src/test/java/io/camunda/zeebe/process/test/qa/embedded/examples/PrCreatedTest.java b/qa/embedded/src/test/java/io/camunda/zeebe/process/test/qa/embedded/examples/PrCreatedTest.java
deleted file mode 100644
index 9a53c415..00000000
--- a/qa/embedded/src/test/java/io/camunda/zeebe/process/test/qa/embedded/examples/PrCreatedTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright © 2021 camunda services GmbH (info@camunda.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.camunda.zeebe.process.test.qa.embedded.examples;
-
-import io.camunda.zeebe.client.ZeebeClient;
-import io.camunda.zeebe.process.test.api.ZeebeTestEngine;
-import io.camunda.zeebe.process.test.extension.ZeebeProcessTest;
-import io.camunda.zeebe.process.test.qa.abstracts.examples.AbstractPrCreatedTest;
-
-@ZeebeProcessTest
-class PrCreatedTest extends AbstractPrCreatedTest {
-
- private ZeebeTestEngine engine;
- private ZeebeClient client;
-
- @Override
- public ZeebeClient getClient() {
- return client;
- }
-
- @Override
- public ZeebeTestEngine getEngine() {
- return engine;
- }
-}
diff --git a/qa/testcontainers/src/test/java/io/camunda/zeebe/process/test/qa/testcontainer/examples/PrCreatedTest.java b/qa/testcontainers/src/test/java/io/camunda/zeebe/process/test/qa/testcontainer/examples/PrCreatedTest.java
deleted file mode 100644
index 3a61db6b..00000000
--- a/qa/testcontainers/src/test/java/io/camunda/zeebe/process/test/qa/testcontainer/examples/PrCreatedTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright © 2021 camunda services GmbH (info@camunda.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.camunda.zeebe.process.test.qa.testcontainer.examples;
-
-import io.camunda.zeebe.client.ZeebeClient;
-import io.camunda.zeebe.process.test.api.ZeebeTestEngine;
-import io.camunda.zeebe.process.test.extension.testcontainer.ZeebeProcessTest;
-import io.camunda.zeebe.process.test.qa.abstracts.examples.AbstractPrCreatedTest;
-
-@ZeebeProcessTest
-public class PrCreatedTest extends AbstractPrCreatedTest {
- private ZeebeTestEngine engine;
- private ZeebeClient client;
-
- @Override
- public ZeebeClient getClient() {
- return client;
- }
-
- @Override
- public ZeebeTestEngine getEngine() {
- return engine;
- }
-}