-
Notifications
You must be signed in to change notification settings - Fork 176
Description
Expected Behavior
I start 2 workflows (one by one) with the same workflowId and WorkflowIdReusePolicy.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE
option.
I use execute
method to start exection.
First workflow is still running when I start the second - so the second should just becomes a "proxy" for the first one and should return the same result without starting a new wf instance.
Then I try to wait for CompletableFuture and get the result.
Pseudo-code for illustration:
f1 = WorkflowClient.execute(..., options)
f2 = WorkflowClient.execute(..., options)
result1 = f1.get()
result2 = f2.get()
The behaviour is very different when I use Test Environment and real docker containers for Temporal.
With "real" Temporal all works as expected.
I expect that in the test environment it works the same way.
Actual Behaviour
With Test Environment the second f2.get() call hangs forever.
If the first workflow is fully completed before starting the second, all works OK.
Steps to Reproduce the Problem
I have a test (implemented in Kotlin) that fully reproduces the described issue. See the attached file.
DuplicateWorkflowIdTest.kt.zip
Specifications
- Version: Java SDK 1.0.7, Temporal 1.8.2
- Platform: Java SDK 1.0.7, Kotlin