Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(timeout): add test for timeout #344

Merged
merged 6 commits into from
Apr 10, 2024
Merged

test(timeout): add test for timeout #344

merged 6 commits into from
Apr 10, 2024

Conversation

steebchen
Copy link
Collaborator

@steebchen steebchen commented Apr 6, 2024

Description

Fixes # (issue)

Type of change

  • Test changes (add, refactor, improve or change a test)

What's Changed

  • add test for workflow timeout (skipped as it's broken)
  • add test for step timeout

Copy link

vercel bot commented Apr 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hatchet-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2024 5:25pm

@steebchen steebchen marked this pull request as ready for review April 8, 2024 15:24
@steebchen steebchen requested a review from abelanger5 April 8, 2024 15:25
Description: "timeout",
Steps: []*worker.WorkflowStep{
worker.Fn(func(ctx worker.HatchetContext) (result *stepOneOutput, err error) {
time.Sleep(time.Second * 60)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be better if we made sure the timeout signal propagates to the step over ctx.Done(), rather than just sleeping

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I thought we already tested this in the cancellation but indeed it's not quite the same thing. I'll adapt.

@steebchen steebchen merged commit 2f7483a into main Apr 10, 2024
19 checks passed
@steebchen steebchen deleted the test/timeout branch April 10, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants