[ui] Flaky test fix: expiring token notification #17924
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've got this acceptance test in the UI that checks to make sure that, when the "10 minutes until your ACL token expires" point hits, you get a notification.
We would create a token with an expiry 10m5s out, wait 0.5s for initialization, and then wait 5s to make sure the notification is there.
With recent test runner changes (Circle -> GHA), we're noticing this fail more often. This may be because the JS runtime is different or slightly slower.
Because the user-facing notification is persistent (doesn't go away on its own), we're safe to wait a little longer before checking if the notification is present. And in order not to take any longer on our already-kind-of-long test runs, I've opted to shorten the token TTL rather than extending the setTimeout() length.