Skip to content

Conversation

funnyboy-roks
Copy link
Member

@funnyboy-roks funnyboy-roks commented Aug 29, 2025

Rewrite test handling, taking advantage of the new Erudite architecture.

Tests will now work like this:
At server startup, TestContexts 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 the Location 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>

@funnyboy-roks funnyboy-roks added the enhancement New feature or request label Aug 29, 2025
question_idx: u32,
question_text: String,
test_results: TestResults,
// test_results: TestResults,
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

It won't be :)

Copy link
Member Author

Choose a reason for hiding this comment

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

1c1a46d :)

@funnyboy-roks funnyboy-roks marked this pull request as ready for review September 26, 2025 23:11
@funnyboy-roks
Copy link
Member Author

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.

@funnyboy-roks funnyboy-roks self-assigned this Oct 4, 2025
@funnyboy-roks funnyboy-roks linked an issue Oct 4, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent submissions after competition is paused or over
2 participants