test(scorecard): adjust scorecard report generation expectation #985
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.
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit -S -m "YOUR_COMMIT_MESSAGE"
See cryostatio/cryostat#698
See #974
Description of the change:
Adjusts the test to not expect a full report JSON response body, on request, but only a job ID string response.
Since cryostatio/cryostat#698 the response is expected to be an async job ID on first request, then later the server will emit a websocket notification containing the same ID to notify clients that the request has been completed. Then when the client makes an identical request again, the report is ready and cached, so the server responds with it this second time around.
In the old system the server would always respond with the report response, even though this could sometimes take considerable time to complete. Because of this long delay, with the server writing no response bytes at all in the interim, clients (especially web browsers) could time out waiting while the server was still processing.
Ideally this scorecard test should be adjusted to account for the entire async job API cycle, but this would mean establishing a websocket connection to the server to listen for the async job ID. I think this is worth looking into but I will do it separately, and just get this minimal fix in ASAP to get CI passing again.
Motivation for the change:
Get scorecards passing again.
How to manually test: