sdk-go
sdk-go copied to clipboard
Allow setting activity timeouts in testsuite
What was changed
Added 2 method to TestActivityEnvironment:
- SetActivityStartToCloseTimeout
- SetActivityScheduleToCloseTimeout
This will allow changing the default 10 minute timeouts in the current test environments.
Why?
There are cases where we would like to test long running activities, or test activity timeouts. The current test suite did not support that, as it had a hardcoded 10 minute timeout.
Checklist
-
Closes #1167
-
How was this tested:
Set the StartToClose timeout to a specific duration, and test that:
- An activity which takes longer than that duration returns an error.
- An activity which takes less than that duration finishes successfully.
Same test for ScheduleToClose, I did not see a difference between them in case of the testsuite.
- Any docs updates needed? Comment added to the new method, I don't believe further updates are needed.