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

Allow setting activity timeouts in testsuite

Open ohad83 opened this issue 2 years ago • 1 comments

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

  1. Closes #1167

  2. 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.

  1. Any docs updates needed? Comment added to the new method, I don't believe further updates are needed.

ohad83 avatar Aug 05 '23 19:08 ohad83

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 05 '23 19:08 CLAassistant