Commit Graph

11 Commits

Author SHA1 Message Date
James Bardin eb4b45941c fix tests affected by refreshGracePeriod
A couple tests require lowering the grace period to keep the test from
taking the full 30s timeout.

The Retry_hang test also needed to be removed from the Parallel group,
becuase it modifies the global refreshGracePeriod variable.
2017-04-19 18:07:00 -04:00
James Bardin af1628eaa4 add refreshGracePeriod
Refresh calls may have side effects that need to be recorded if it
succeeds, especially common when when WaitForState is called from
resource.Retry.

If the WaitForState timeout is reached and there is a Refresh call
in-flight, wait up to refreshGracePeriod (set to 30s) for it to
complete.
2017-04-19 18:07:00 -04:00
David Tolnay 7e1cd34819 Timing out is not success 2016-06-30 18:07:56 -07:00
Radek Simko 8582f4df9f helper/resource: Fix TestRetry 2016-03-10 14:13:23 +00:00
Paul Hinze 108ccf0007 builtin: Refactor resource.Retry to clarify return
Change the `RetryFunc` from a plain `error` return type to a
specialized `RetryError` which must decide whether it is
retryable or not.

Add `RetryableError` / `NonRetryableError` factory functions that
callers are meant to use to build up these errors.

This makes it eminently clear whether or not a given error is
retryable from inside the client code.

Goal here is to _not_ change any behavior, simply reflect the
existing behavior with the new, clearer, API.
2016-03-09 17:37:56 -06:00
Mitchell Hashimoto b4f8b7f43b helper/resource: RetryError for quitting quickly 2014-10-17 18:28:03 -07:00
Mitchell Hashimoto 36f225dea0 fmt 2014-10-10 14:50:35 -07:00
Mitchell Hashimoto ef62fa80db helper/resource: add Retry function 2014-10-07 21:44:51 -07:00
Mitchell Hashimoto 1c725896ca helper/resource: support waiting on absense of thing 2014-07-07 15:38:26 -07:00
Jack Pearkes 5ae69778a1 helper/resource: wait should return obj 2014-07-07 10:07:06 -04:00
Jack Pearkes eb7c8c07c8 helpers/resource: add wait helper 2014-07-07 10:07:06 -04:00