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

Fix signal CAN non determinism test #2084

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 @@ -47,7 +47,7 @@
import org.junit.Test;

public class SignalContinueAsNewNonDeterminism {
private static final Semaphore workflowTaskProcessed = new Semaphore(1);
private static final Semaphore workflowTaskProcessed = new Semaphore(0);

private static final CompletableFuture<Boolean> continueAsNew = new CompletableFuture<>();

Expand Down Expand Up @@ -78,10 +78,11 @@ public void testSignalContinueAsNewNonDeterminism()

WorkflowClient.start(client::execute, false);
for (int i = 0; i < 5; i++) {
workflowTaskProcessed.acquire();
client.signal();
workflowTaskProcessed.acquire();
}
continueAsNew.complete(true);

// Force replay, expected to fail with NonDeterministicException
testWorkflowRule.invalidateWorkflowCache();
client.signal();
Expand Down
Loading