Closed as not planned
Description
What are you really trying to do?
I am trying to test a workflow that spins up one child workflow inside a future.
Describe the bug
- Without a child workflow, the following code returns a
result
one can assert against. - With a child workflow, the following code has
result
nil, even if you try to wait for workflow handle. This happens often, but not all the time, implying a race condition?
However, in both scenarios, it's very evident that all workflows, child workflows, and activities are running.
Temporalio::Testing::WorkflowEnvironment.start_time_skipping do |env|
worker = Temporalio::Worker.new(
client: env.client,
task_queue: "tq-#{SecureRandom.uuid}",
workflows: [
AnalyzerUploadWorkflow,
AnalyzerDocumentCreationWorkflow # Child workflow
],
activities: [
AnalyzerUploadActivities::BestPdfSplit,
PdfImageActivities::Ingestion,
AnalyzerDocument::CreationActivity
]
)
result = worker.run do
env.client.execute_workflow(
AnalyzerUploadWorkflow,
analyzer_upload.id,
id: workflow_id,
task_queue: worker.task_queue
)
end
expect(result).to be_present # <--- fails if AnalyzerUploadWorkflow is refactored to have child workflow
end
Minimal Reproduction
TBD
Environment/Versions
- OS and processor: M3 MacBook
- Temporal Version: Ruby SDK 0.4
- Are you using Docker or Kubernetes or building Temporal from source? Temporal test suite