Skip to content

Workflows: Add a way to test workflow hibernation #5030

@timfish

Description

@timfish

When writing libraries or code to work with Cloudflare Workflows, we have to consider the fact that the state may be lost due to hibernation.

However, there is currently no (reasonable) way to test that our libraries or code do not violate the workflow rules and are not impacted by hibernation.

We could:

await step.sleep("Hopefully this hibernates", "1 hour");

But this is not really viable for tests!

How about something like this that only works with wrangler?

await step.hibernate();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions