Always clear runner strategy after each test case

Otherwise, we get different test results depending on the test order.
This commit is contained in:
Sebastian Serth
2023-06-22 19:45:10 +02:00
parent 837c904192
commit ccbf41005b
4 changed files with 19 additions and 6 deletions

View File

@ -225,8 +225,6 @@ describe ExecutionEnvironmentsController do
let(:runner_management_config) { {runner_management: {enabled: true, strategy: :poseidon}} }
before do
# Ensure to reset the memorized helper
Runner.instance_variable_set :@strategy_class, nil
allow(CodeOcean::Config).to receive(:new).with(:code_ocean).and_return(codeocean_config)
allow(codeocean_config).to receive(:read).and_return(runner_management_config)
end