sdk-go icon indicating copy to clipboard operation
sdk-go copied to clipboard

Allow setting activity timeouts in TestActivityEnvironment

Open ohad83 opened this issue 2 years ago • 4 comments

Currently, the TestActivityEnvironment has a hard-coded 10 minute timeout. If I want to use the test suite to run an activity which takes longer than that, it fails with a timeout error.

Adding the ability to run the activity with options like timeout values in the test environment would help a lot in testing and debugging long activities.

Thanks!

ohad83 avatar Jul 19 '23 18:07 ohad83

+1 to this.

Activity test times out at 10 minute point, which is too short for some of my activities.

Delicious-Bacon avatar Aug 05 '23 12:08 Delicious-Bacon

If I want to use the test suite to run an activity which takes longer than that, it fails with a timeout error.

While supporting an override is fine, in general I think you should use a real server if you are running such tests (you can easily start a dev server using the testsuite package).

cretz avatar Aug 07 '23 13:08 cretz

you can easily start a dev server using the testsuite package

Which is extra boilerplate code just to execute an Activity, isn't it?

I already have loads of test Workflows that bloat my project and bring confusion by decoupling the Go's testing tools from those "tests". I end up saving results of those Workflows to a file and then manually check the results instead of implementing testing package.

Delicious-Bacon avatar Oct 09 '23 10:10 Delicious-Bacon

Which is extra boilerplate code just to execute an Activity, isn't it?

Not sure about "boilerplate". It starts a real server you can do real integration tests on. There's a lot of value in running against a real server.

cretz avatar Oct 09 '23 12:10 cretz