Waiters#292
Conversation
| end | ||
| expect_any_instance_of(waiter).to receive(:delay).and_wrap_original do |m, *args| | ||
| delay = m.call(*args) | ||
| expect(delay).to equal(5) |
There was a problem hiding this comment.
This test case is an example of the question I had in my doc regarding waiter retries. Because the remaining time (5) minus the delay (value between min delay of 3 and max delay of 4) is less than the min delay, the final delay value is set to be equal to the remaining time, which is 5. However, this exceeds the max delay. Is this expected behavior?
jterapin
left a comment
There was a problem hiding this comment.
Nice! Great work so far - mini-review since you are working through changes and etc.
mullermp
left a comment
There was a problem hiding this comment.
Nice! Getting better. Sorry for the barrage of comments.
mullermp
left a comment
There was a problem hiding this comment.
Nice! Clean ups are looking good. This should be very close.
| # @api private | ||
| module Waiters | ||
| <% waiters.each do |waiter| -%> | ||
| <% if waiter.deprecated -%> |
There was a problem hiding this comment.
Up to you - you can always have a method deprecated? instead of attribute accessor deprecated - since you never actually need to retrieve any nested value of deprecated, it's simply a boolean. That's more conventional.
| @@ -0,0 +1,38 @@ | |||
| $version: "2" | |||
There was a problem hiding this comment.
nit - name of folder waiters
Description of changes:
Support the
#waitabletrait with waiters. Customers can use code generated waiters throughclient.wait_until(:waiter_name, params, options).By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.