pulumi/pkg/backend/httpstate
Thomas Gummerer 2bd4be8ecd
make sure the token source test is not flaky (#17545)
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.
2024-10-14 08:44:41 +00:00
..
client Add explanations about features to improve UX (#17307) 2024-09-26 14:40:51 +00:00
testdata [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
backend.go Respect existing stack configuration when initialising secret managers (#17465) 2024-10-03 15:40:39 +00:00
backend_test.go Let `Backend.CreateStack` accept an initial state (#17369) 2024-09-26 08:00:52 +00:00
console.go Add support for a PULUMI_CONSOLE_DOMAIN env var (#4410) 2020-04-17 11:50:00 -07:00
console_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
diffs.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
diffs_post_1.20.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
diffs_pre_1.20.go [snapshot] Use a newer diff package 2023-05-16 12:33:30 -07:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
environments.go Merge ESC Projects feature branch (#17226) 2024-09-10 23:08:09 +00:00
mock.go Update pu/pu to support deployment run command (#16492) 2024-07-01 14:18:44 +00:00
policypack.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
snapshot.go Lift context parameter to SerializeDeployment/Resource/Operations/Properties (#15929) 2024-04-15 07:45:46 +00:00
snapshot_test.go Add display to the engine tests (#16050) 2024-05-13 07:18:25 +00:00
stack.go Enable some more linting rules (#17456) 2024-10-03 17:37:13 +00:00
state.go Keep the token source loop going in the face of errors (#17519) 2024-10-08 15:16:04 +00:00
token_source.go Keep the token source loop going in the face of errors (#17519) 2024-10-08 15:16:04 +00:00
token_source_test.go make sure the token source test is not flaky (#17545) 2024-10-14 08:44:41 +00:00