Attach duration information to the exception object
This commit is contained in:

committed by
Sebastian Serth

parent
36578a2817
commit
2dff81a510
@ -261,18 +261,10 @@ describe Runner::Strategy::DockerContainerPool do
|
||||
end
|
||||
|
||||
describe '#attach_to_execution' do
|
||||
# TODO: add more tests here
|
||||
# TODO: add tests here
|
||||
|
||||
let(:command) { 'ls' }
|
||||
let(:action) { -> { container_pool.attach_to_execution(command) } }
|
||||
let(:websocket_url) { 'ws://ws.example.com/path/to/websocket' }
|
||||
|
||||
it 'returns the execution time' do
|
||||
allow(EventMachine).to receive(:run)
|
||||
starting_time = Time.zone.now
|
||||
execution_time = action.call
|
||||
test_time = Time.zone.now - starting_time
|
||||
expect(execution_time).to be_between(0.0, test_time).exclusive
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user