Skip to content

Add a retry mechanism for authorization tests#118

Merged
edwardsph merged 5 commits into
solid-contrib:mainfrom
acoburn:add-retries
Mar 20, 2024
Merged

Add a retry mechanism for authorization tests#118
edwardsph merged 5 commits into
solid-contrib:mainfrom
acoburn:add-retries

Conversation

@acoburn

@acoburn acoburn commented Mar 19, 2024

Copy link
Copy Markdown
Contributor

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>)

@edwardsph edwardsph left a comment

Copy link
Copy Markdown
Collaborator

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

Comment thread web-access-control/protected-operation/write-access-agent.feature Outdated

@edwardsph edwardsph left a comment

Copy link
Copy Markdown
Collaborator

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