• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

temporalio / sdk-go / 6287105222 / 1
61%
master: 61%

Build:
DEFAULT BRANCH: master
Ran 24 Sep 2023 01:26AM UTC
Files 94
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Sep 2023 01:10AM UTC coverage: 72.179% (+0.09%) from 72.089%
6287105222.1

push

github

web-flow
Expose SetContinuedAsNewRunID in the TestWorkflowEnvironment (#1246)

* Export SetContinuedAsNewRunID in the TestWorkflowEnvironment

When building some workflows ("actors" like ones are a good example),
you sometimes want to be able to distinguish when a workflow is starting
and when it's being continued as new. This allows you to execute
different behavior like restoring some state from an external system.

One way to check if your current workflow execution has been continued
as new is to inspect the workflow info ContinuedAsNewRunID field. When
it's set, then you now you are not starting fresh.

When testing such workflows though, you may want to test behavior only
after a first ContinueAsNew call. The easiest way to do that is to
setup the test environment to fill up the workflow info
ContinuedAsNewRunID field.

This is what this commit is doing, it extends the
TestWorkflowEnvironment to expose a SetContinuedExecutionID field to an
arbitrary value.

This way in workflow unit tests, we can skip the code paths we don't
care about and don't resort to mocking activities and child workflows
for nothing leading to easier to implement and easier to read tests.

* Renamed SetContinuedAsNewRunID to SetContinuedExecutionRunID

Let's be consistent with the workflow info field name.

Co-authored-by: Chad Retz <chad.retz@gmail.com>

---------

Co-authored-by: Chad Retz <chad.retz@gmail.com>

14173 of 19636 relevant lines covered (72.18%)

13116.23 hits per line

Source Files on job 6287105222.1
  • Tree
  • List 0
  • Changed 24
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 6287105222
  • bfb39ace on github
  • Prev Job for on master (#6228388518.1)
  • Next Job for on master (#6287870934.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc