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.
This commit is contained in:

committed by
Sebastian Serth

parent
c7369366d5
commit
c8e1a0bbcb
@ -264,7 +264,8 @@ describe Runner::Strategy::DockerContainerPool do
|
||||
# TODO: add tests here
|
||||
|
||||
let(:command) { 'ls' }
|
||||
let(:action) { -> { container_pool.attach_to_execution(command) } }
|
||||
let(:event_loop) { Runner::EventLoop.new }
|
||||
let(:action) { -> { container_pool.attach_to_execution(command, event_loop) } }
|
||||
let(:websocket_url) { 'ws://ws.example.com/path/to/websocket' }
|
||||
end
|
||||
end
|
||||
|
@ -292,7 +292,8 @@ describe Runner::Strategy::Poseidon do
|
||||
# TODO: add tests here
|
||||
|
||||
let(:command) { 'ls' }
|
||||
let(:action) { -> { poseidon.attach_to_execution(command) } }
|
||||
let(:event_loop) { Runner::EventLoop.new }
|
||||
let(:action) { -> { poseidon.attach_to_execution(command, event_loop) } }
|
||||
let(:websocket_url) { 'ws://ws.example.com/path/to/websocket' }
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user