From b1f21509aeaf1722aeafdd5a76058fe75a67d95e Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Mon, 11 Jan 2021 18:18:13 +0100 Subject: [PATCH] Log info about timeout in RegEx --- lib/py_lint_adapter.rb | 1 + lib/py_unit_adapter.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/py_lint_adapter.rb b/lib/py_lint_adapter.rb index e2249af8..e45a46f5 100644 --- a/lib/py_lint_adapter.rb +++ b/lib/py_lint_adapter.rb @@ -34,6 +34,7 @@ class PyLintAdapter < TestingFrameworkAdapter end || [] end rescue Timeout::Error + Raven.capture_message({stdout: output[:stdout], regex: ASSERTION_ERROR_REGEXP}.to_json) assertion_error_matches = [] end concatenated_errors = assertion_error_matches.map { |result| "#{result[:name]}: #{result[:result]}" }.flatten diff --git a/lib/py_unit_adapter.rb b/lib/py_unit_adapter.rb index 25c2fb07..a19839d4 100644 --- a/lib/py_unit_adapter.rb +++ b/lib/py_unit_adapter.rb @@ -28,6 +28,7 @@ class PyUnitAdapter < TestingFrameworkAdapter }.flatten || [] end rescue Timeout::Error + Raven.capture_message({stderr: output[:stderr], regex: ASSERTION_ERROR_REGEXP}.to_json) assertion_error_matches = [] end {count: count, failed: failed + errors, error_messages: assertion_error_matches}