Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(engine): stabilize SignalEventConcurrencyTest #3526

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package org.camunda.bpm.engine.test.bpmn.event.signal;

import static org.assertj.core.api.Assertions.assertThat;

import org.camunda.bpm.engine.RepositoryService;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.TaskService;
Expand All @@ -39,14 +41,12 @@
import org.junit.rules.RuleChain;
import org.mockito.Mockito;

import static org.assertj.core.api.Assertions.assertThat;

public class SignalEventConcurrencyTest extends ConcurrencyTestHelper {

@ClassRule
public static ProcessEngineBootstrapRule bootstrapRule = new ProcessEngineBootstrapRule();
protected ProvidedProcessEngineRule engineRule = new ProvidedProcessEngineRule(bootstrapRule);
public ProcessEngineTestRule testRule = new ProcessEngineTestRule(engineRule);
protected ProcessEngineTestRule testRule = new ProcessEngineTestRule(engineRule);

@Rule
public RuleChain ruleChain = RuleChain.outerRule(engineRule).around(testRule);
Expand All @@ -57,6 +57,7 @@ public class SignalEventConcurrencyTest extends ConcurrencyTestHelper {
protected EventHandler signalEventHandler;
protected EventHandler evSpy;

@Override
@Before
public void init() {
processEngineConfiguration = engineRule.getProcessEngineConfiguration();
Expand Down Expand Up @@ -114,7 +115,6 @@ public Object execute(final CommandContext commandContext) {
taskService.complete(mainTask.getId());

// unblock the second thread in the handleEvent
signalThread.makeContinue();
signalThread.waitUntilDone(true);

// sending the signal will fail because it cannot find the execution anymore
Expand Down