Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a retry mechanism for authorization tests #118

Merged
merged 5 commits into from
Mar 20, 2024

Conversation

acoburn
Copy link
Contributor

@acoburn acoburn commented Mar 19, 2024

Some Solid server implementations may propagate access policies asynchronously. In those cases, it would be useful for the test suite to make use of Karate's retry until mechanism.

For simple cases where the retry matches a particular status code, the code for this is trivial:

And retry until responseStatus == <status>

In cases where a range of possible response status codes are possible, we needed to wrap the condition in a shared function, which is called utils.includesExpectedStatus(actual, expected)

For those cases, the condition becomes:

And retry until utils.includesExpectedStatus(responseStatus, <status>)

Copy link
Collaborator

@edwardsph edwardsph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something odd got picked up with this

Copy link
Collaborator

@edwardsph edwardsph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@edwardsph edwardsph merged commit a430fc9 into solid-contrib:main Mar 20, 2024
@acoburn acoburn deleted the add-retries branch March 20, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants