9e2cff7558
Attach connection errors to socket
...
Raising the errors would crash the current thread. As this thread
contains the Eventmachine, that would influence other connections
as well. Attaching the errors to the connection and reading them
after the connection was closed ensures that the thread stays
alive while handling the errors in the main thread of the current
request.
2021-11-01 17:12:53 +01:00
c8e1a0bbcb
Fix tests for Runner#attach_to_execution
...
These tests were blocking because of the newly introduced
EventLoop. The messages sent to the EventLoop are now mocked
and the EventLoop isn't blocking anymore in the tests.
2021-11-01 17:12:53 +01:00
2dff81a510
Attach duration information to the exception object
2021-11-01 17:12:52 +01:00
db2d1e3164
Add tests for DockerContainerPool strategy
2021-11-01 17:12:51 +01:00
704407b9fc
Add strategy for DockerContainerPool
...
In order to provide an alternative to Poseidon, a strategy for the
DockerContainerPool is added that is used by the runner model.
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de >
2021-11-01 17:12:51 +01:00
1d3f0d7ad8
Handle Faraday errors
2021-11-01 17:12:50 +01:00
b48b45de9f
Refactor error classes
...
All runner errors are now in a single file. The not found error
has been splitted into an error for runner not found and for
environment not found.
2021-11-01 17:12:50 +01:00
413f9b2705
Improve error resilience and handling
...
Timeouts are now handled correctly and the Runner automatically
creates the execution environment if it could not be found in
Poseidon. The runner is deleted locally if Poseidon returns
a bad request error.
2021-11-01 17:12:50 +01:00
b6bc578aea
Move submission scoring from controller concern to submission model
...
Localization and markdown formatting is now done in a controller
spec in order to bring this logic away from the data and towards
the view.
2021-11-01 17:12:50 +01:00
d0d1b1bffd
Introduce strategy for runner behavior
...
The runner model is only a class responsible for storing information
now. Based on the configuration it picks a strategy for the runner
management. The Poseidon strategy is already implemented and tested.
The Docker strategy will follow.
2021-11-01 17:12:49 +01:00
0978a3be83
Add tests for the different runner errors
2021-11-01 17:12:48 +01:00
d22d24df4d
Add tests for execution environment copy to Poseidon
2021-11-01 17:12:48 +01:00
74e285e9fd
Fix rubocop offenses
2021-10-05 12:09:56 +02:00
da0a682ffb
Apply manual rubocop fixes
2021-05-14 22:03:06 +02:00
6cbecb5b39
Apply automatic rubocop fixes
2021-05-14 22:03:06 +02:00
44b32b6f6a
#46 Add Prometheus exporter
2021-04-07 14:06:32 +02:00
66c1b99230
Fix spec for user redirect
...
* Very simple fix. I could also remove the test but as long as we still consider to switch back to the original implementation, I leave it here for now.
2020-09-28 19:17:30 +02:00
c89ee6c102
model and policy specs
2019-12-07 13:11:48 +01:00
f89d740671
fix test
2019-03-29 15:46:42 +01:00
56c59a616e
Completely remove old non-structured errors and migrate existing ones.
2018-11-30 11:27:25 +01:00
efacb5a6a9
Completely remove old hints connected to the execution environment
2018-11-28 01:21:13 +01:00
90defa8f89
Fix tests and rename request
variable in specs to perform_request
...
Explanation: Using the variable name `request` might interfere with methods in Rails core system prevent successful test execution. See this issue: https://github.com/turbolinks/turbolinks-rails/issues/38
2018-11-06 16:49:42 +01:00
9666683bd7
Fix error, submission, hints and help views
2018-11-06 16:46:01 +01:00
fc873cb053
second run of replacement regex from https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md ...
...
Nested calls seem to be fun..
2017-11-15 15:37:42 +01:00
0e26ab98c8
rename factory_girl_(rails) to factory_bot_(rails)
2017-11-15 15:18:07 +01:00
03141409e8
Fix tests for user_exercise_feedback
2017-11-08 15:41:48 +01:00
0fd993c1cd
Move submission url attributes to controller test
2017-10-26 15:48:21 +02:00
a00adbce25
Move *_url spec to controller, because the subscription model does not handle urls anymore
2017-10-16 14:02:40 +02:00
41b0c1e530
solve extension probelm
2016-08-03 17:21:49 +02:00
4183a16178
merge with master
2016-08-03 12:09:58 +02:00
2bb1362520
further delete (spec files)
2016-07-04 16:59:30 +02:00
7bc3c4e27c
Fix tests in models/execution_environment_spec.rb, uncomment @image in lib/docker_client.rb
2016-05-25 15:56:49 +02:00
5dc8fb9774
Fix in models/exercise_spec.rb, repair average_score without submission
2016-05-25 14:41:53 +02:00
b5c3d8170d
Fix in models/exercise_spec.rb, repair average_percentage without submission
2016-05-25 14:39:48 +02:00
f5339e4664
Renamed tests, fix default
2015-04-28 11:40:49 +02:00
c3a56e6429
fixed tests
2015-04-27 17:58:44 +02:00
d109663cb9
extracted boolean validation logic into stand-alone validator
2015-03-18 09:10:58 +01:00
15d8984a9e
added the ability to prohibit network access for code submissions executed using Docker
2015-03-17 17:14:25 +01:00
b1218e0b80
added the ability to limit memory consumption of code submissions executed using Docker
2015-03-17 15:51:59 +01:00
839fdebb71
fixed broken test
2015-03-12 19:08:13 +01:00
9aecfedc1b
added specs
2015-03-05 10:49:08 +01:00
8dfc92d8c9
added tests
2015-02-26 10:42:18 +01:00
9bcc27e129
added tests
2015-02-24 19:08:53 +01:00
113e05d310
minor changes
2015-02-24 16:25:47 +01:00
473e353dd8
added test
2015-02-24 14:37:03 +01:00
bfc11c333a
added test
2015-02-24 11:47:29 +01:00
ded7825de8
added tests
2015-02-23 17:33:30 +01:00
e8d7f172b9
fixed broken password confirmation on password reset
2015-02-23 16:19:06 +01:00
11a0679b3a
fixed style
2015-02-23 12:39:40 +01:00
466f8967e2
eliminated naming clash with Sorcery
2015-02-23 10:39:04 +01:00