Closed longquanzheng closed 3 years ago
You can repro the unhandled signal by these steps:
./bin/signalcounter
WorkflowID
./bin/signalcounter -m signal -w <WorkflowID>
./bin/signalcounter -m worker
(qlong-selector-signal-counter-wrong)$./bin/signalcounter -m worker 2021-07-14T08:53:26.595-0700 INFO common/sample_helper.go:109 Logger created. 2021-07-14T08:53:26.595-0700 DEBUG common/factory.go:151 Creating RPC dispatcher outbound{"ServiceName": "cadence-frontend", "HostPort": "127.0.0.1:7933"} 2021-07-14T08:53:26.599-0700 INFO common/sample_helper.go:161 Domain successfully registered. {"Domain": "samples-domain"} 2021-07-14T08:53:26.639-0700 INFO internal/internal_worker.go:833 Started Workflow Worker{"Domain": "samples-domain", "TaskList": "signal_counter", "WorkerID": "96232@IT-USA-25920@signal_counter"} 2021-07-14T08:53:26.639-0700 INFO internal/internal_worker.go:837 Worker has no activities registered, so activity worker will not be started. {"Domain": "samples-domain", "TaskList": "signal_counter", "WorkerID": "96232@IT-USA-25920@signal_counter"} 2021-07-14T08:53:26.646-0700 INFO internal/internal_workflow.go:553 Workflow has unhandled signals {"Domain": "samples-domain", "TaskList": "signal_counter", "WorkerID": "96232@IT-USA-25920@signal_counter", "WorkflowType": "main.sampleSignalCounterWorkflow", "WorkflowID": "signal_counter_1e89daff-5630-4106-b27d-0b86ee0a3cde", "RunID": "e7ad6861-022f-4595-b9e5-e921c6e6f3de", "SignalNames": ["channelA"]}
Unit test would also fail:
=== RUN TestUnitTestSuite/Test_SampleSignalCounterWorkflow 2021-07-14T08:51:59.334-0700 INFO internal/internal_workflow.go:553 Workflow has unhandled signals {"SignalNames": ["channelA"]} workflow_test.go:47: Error Trace: workflow_test.go:47 Error: Not equal: expected: 110 actual : 100 Test: TestUnitTestSuite/Test_SampleSignalCounterWorkflow --- FAIL: TestUnitTestSuite/Test_SampleSignalCounterWorkflow (0.00s) Expected :110 Actual :100
You can repro the unhandled signal by these steps:
./bin/signalcounter
, get theWorkflowID
from the log./bin/signalcounter -m signal -w <WorkflowID>
./bin/signalcounter -m worker
and you will see the log like this:Unit test would also fail: