Project

Profile

Help

Task #7225

Generate FAILED build status and apropriate message at letter in case of mysql fail at scripts/build_parser/write_build_results.rb

Added by Mark Zaslavskiy almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
High
Assignee:
Timofey Turenko
Category:
mariadb testing
Sprint/Milestone:
Start date:
13.07.2016
Due date:
% Done:

0%

Estimated time:
2:00 h
Target branch:
Test scenario:

0. http://maxscale-jenkins.mariadb.com:8090/job/mdbci_integration_test/375/

1. Run

scripts/build_parser/write_build_results.rb -f scripts/build_parser/7225_tst/json -e scripts/build_parser/7225_tst/results

Expected result (almost simmilar except id in last Performed insert )

Starting ./write_build_results.rb
Connection to db (:default_file => ./defaults, :host => localhost, :database => test_results_db established successfuly
Performed insert (test_run, id = 30): INSERT INTO test_run (jenkins_id, start_time, target, box, product, mariadb_version, test_code_commit_id, maxscale_commit_id, job_name) VALUES ('187', '2016-06-20 10-02-06', 'pushtest-70 ', 'centos_7_libvirt', 'mariadb', '10.0', '66d10ab5c6e5da7798df5495da3a57554ebb83c9', '2cfd2c67690395c26cbc4177678a6c7e61e59719', 'run_test')
Preparing to write test={"test_name"=>"regexfilter1", "test_success"=>"Passed"} into results
Performed insert (results): INSERT INTO results (id, test, result) VALUES ('30', 'regexfilter1', '0')
./write_build_results.rb finished

Run

cat scripts/build_parser/7225_tst/results

Expected result is a empty output

2. Run

vood@vood-ThinkPad:~/ws/mdbci$ scripts/build_parser/write_build_results.rb -f scripts/build_parser/7225_tst/json -e scripts/build_parser/7225_tst/results

Expected result

Starting ./write_build_results.rb
cannot load such file -- mysql2
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
scripts/build_parser/write_build_results.rb:144:in `main'
scripts/build_parser/write_build_results.rb:161:in `<main>'
./write_build_results.rb finished

Run

cat scripts/build_parser/7225_tst/results

Expected result

DB_WRITE_ERROR cannot load such file -- mysql2


Description

Add error handling for mysql at scripts/build_parser/write_build_results.rb
In case of errors change build status to failed and add information about error to build letter

History

#1 Updated by Mark Zaslavskiy almost 5 years ago

  • Description updated (diff)

#2 Updated by Mark Zaslavskiy almost 5 years ago

  • Priority changed from Normal to High

#3 Updated by Mark Zaslavskiy almost 5 years ago

  • Status changed from New to Active / In progress

#4 Updated by Mark Zaslavskiy almost 5 years ago

  • Estimated time set to 2:00 h

#5 Updated by Mark Zaslavskiy almost 5 years ago

File, where fail info should be written - results_$BUILD_ID
Env var - DB_WRITE_ERROR

#7 Updated by Mark Zaslavskiy almost 5 years ago

  • Status changed from Active / In progress to Review

#8 Updated by Mark Zaslavskiy almost 5 years ago

  • Status changed from Review to Active / In progress

#9 Updated by Mark Zaslavskiy almost 5 years ago

  • Status changed from Active / In progress to Review

#10 Updated by Mark Zaslavskiy almost 5 years ago

  • Status changed from Review to Testing
  • Assignee changed from Mark Zaslavskiy to Timofey Turenko

#11 Updated by Timofey Turenko almost 5 years ago

  • Status changed from Testing to Closed

Also available in: Atom PDF