mirror of https://github.com/pulumi/pulumi.git
2bd4be8ecd
In the token source test, we introduce some network "flakyness" to make sure getting the token is retried if there are any errors from the backend. In the current state this unfortunately makes the test flaky for two reasons: - We have no limit on the number of network errors we're returning, but a limited number of retries before the token expires. - We only advance the clock duration/16 each time, which further limits the number of retries, since we might "step over" some of the retries we're supposed to de doing. I.e. currently the token expires after 8ms, and we run the renew function every 1/8 duration, so every 1ms. However the step were taking each time is 5ms, which doesn't guarantee any retries. Fix this by both advancing the clock more frequently, meaning we're actually retrying more often, and limiting the number of network errors to two for each token refresh cycle, so we're not at the mercy of the RNG anymore. |
||
---|---|---|
.. | ||
display | ||
diy | ||
filestate | ||
httpstate | ||
state | ||
apply.go | ||
apply_test.go | ||
backend.go | ||
backend_test.go | ||
cancellation_scope.go | ||
doc.go | ||
errors.go | ||
inmemoryPersister.go | ||
login_manager.go | ||
mock.go | ||
policypack.go | ||
query.go | ||
snapshot.go | ||
snapshot_test.go | ||
stack.go | ||
updates.go | ||
watch.go |