【问题标题】:How to set Cadence test workflow id?如何设置 Cadence 测试工作流 id?
【发布时间】:2021-04-23 07:44:36
【问题描述】:

我正在关注https://cadenceworkflow.io/docs/go-client/workflow-testing/#setup,发现Activity error. {"WorkflowID": "default-test-workflow-id" 出现错误。

我该如何设置WorkflowID(例如让它包含测试名称)?我正在使用 Go。

【问题讨论】:

    标签: cadence-workflow


    【解决方案1】:

    不支持直接设置工作流ID。我们最近意识到了这一点,并正在积极努力。

    同时,如果您必须使用 workflowID 进行测试,则可以使用一种解决方法

    ReplayWorkflowExecution(ctx context.Context, service workflowserviceclient.Interface, logger *zap.Logger, domain string, execution workflow.Execution) error
    

    但您必须模拟服务接口以获取历史记录。

    https://github.com/uber-go/cadence-client/blob/b31c3bbfb06a1f96c6ad911a48237cfbc4f9a565/worker/worker.go#L166

    当这个功能实现时我会更新这个线程。

    【讨论】:

      猜你喜欢
      • 2021-11-08
      • 2020-11-29
      • 1970-01-01
      • 2021-01-03
      • 2014-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多