-
Notifications
You must be signed in to change notification settings - Fork 0
Add changes from Erudite (basically rewrite test handling) #64
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
base: main
Are you sure you want to change the base?
Conversation
question_idx: u32, | ||
question_text: String, | ||
test_results: TestResults, | ||
// test_results: TestResults, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just putting this comment here so this isn't forgotten
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't be :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1c1a46d :)
I think this PR is finally ready, though it will break the current client, so those changes should probably be made before this PR is merged. |
Rewrite test handling, taking advantage of the new Erudite architecture.
Tests will now work like this:
At server startup,
TestContext
s will be built for each test environment (atm just each language, but will expand to workspaces, once implemented)To run a test/submission, a POST request should be set to
/questions/<id>/tests
or/questions/<id>/submissions
, this will return the id of the test and set theLocation
header to a location for polling.This will spawn the test suite. If the user has a websocket connected, they will receive live events when the individual tests finish (debounced).
The state of tests/submissions can be polled by sending a GET request to
/questions/<question-id>/tests/<test-id>
or/questions/<question-id>/submissions/<submission-id>
Additionally, tests can be cancelled by sending a DELETE request to
/questions/<question-id>/tests/<test-id>
or/questions/<question-id>/submissions/<submission-id>