lib/lopata/observers/web_logger.rb in lopata-0.1.19 vs lib/lopata/observers/web_logger.rb in lopata-0.1.20
- old
+ new
@@ -50,9 +50,13 @@
status = scenario.failed? ? Lopata::FAILED : Lopata::PASSED
steps = scenario.steps.map { |s| step_hash(s) }
request = { status: status, steps: steps, launch: { id: @launch_id, finished: finished } }
test = test_id(scenario)
post("/tests/#{test}/attempts.json", body: request)
+ rescue SocketError => e
+ # Ignore network problems. Continue with next scenario when cannot log results.
+ puts e.message
+ puts e.backtrace
end
def step_hash(step)
hash = { status: step.status, title: step.title }
if step.failed?
\ No newline at end of file