You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We keep running into the following error sporadically in our build. 17:02:38 /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:160:in `-': nil can't be coerced into Fixnum (TypeError) 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:160:in `handle_end_test_suite' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:99:in `block in parse_input' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:55:in `each' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:55:in `each' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:55:in `parse_input' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:43:in `initialize' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:236:in `new' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:236:in `<top (required)>' 17:02:38 from /usr/local/bin/ocunit2junit:23:in `load' 17:02:38 from /usr/local/bin/ocunit2junit:23:in `<main>'
It happens when end_time is nil in handle_end_test_suite. def handle_end_test_suite(test_name,end_time) unless @ended_current_test_suite current_file = File.open("#{TEST_REPORTS_FOLDER}/TEST-#{test_name}.xml", 'w') host_name = string_to_xml Socket.gethostname test_name = string_to_xml test_name test_duration = (end_time - @cur_start_time).to_s total_tests = @total_failed_test_cases + @total_passed_test_cases
We have tried to resolve this by adding a if statement before the arithmetic operation. end_time=0 if end_time.nil?
will this work or break something else?
The text was updated successfully, but these errors were encountered:
We keep running into the following error sporadically in our build.
17:02:38 /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:160:in `-': nil can't be coerced into Fixnum (TypeError) 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:160:in `handle_end_test_suite' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:99:in `block in parse_input' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:55:in `each' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:55:in `each' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:55:in `parse_input' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:43:in `initialize' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:236:in `new' 17:02:38 from /usr/local/lib/ruby/gems/2.3.0/gems/ocunit2junit-1.4/bin/ocunit2junit:236:in `<top (required)>' 17:02:38 from /usr/local/bin/ocunit2junit:23:in `load' 17:02:38 from /usr/local/bin/ocunit2junit:23:in `<main>'
It happens when end_time is nil in handle_end_test_suite.
def handle_end_test_suite(test_name,end_time) unless @ended_current_test_suite current_file = File.open("#{TEST_REPORTS_FOLDER}/TEST-#{test_name}.xml", 'w') host_name = string_to_xml Socket.gethostname test_name = string_to_xml test_name test_duration = (end_time - @cur_start_time).to_s total_tests = @total_failed_test_cases + @total_passed_test_cases
We have tried to resolve this by adding a if statement before the arithmetic operation.
end_time=0 if end_time.nil?
will this work or break something else?
The text was updated successfully, but these errors were encountered: