Attached patch will fix t/db_dependent/Letters.t from failing on Jenkins. The code is from Jonathan, debugging the problem on my laptop.
Created attachment 56438 [details] [review] Bug 17441 - t/db_dependent/Letters.t fails on Jenkins Run prove t/db_dependent/Letters.t
Created attachment 56462 [details] [review] Bug 17441 - t/db_dependent/Letters.t fails on Jenkins Run prove t/db_dependent/Letters.t Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Created attachment 56491 [details] [review] Bug 17441 - t/db_dependent/Letters.t fails on Jenkins Run prove t/db_dependent/Letters.t Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> To improve consistency, adding a follow-up.
Created attachment 56492 [details] [review] Bug 17441: [QA Follow-up] Return value of SendAlerts This patch makes the return value of SendAlerts more consistent. It returns 1 on success, or undef || { error => 'msg' } on failure. Needed to adjust one test in Letters.t too. Adjusted one typo along the way (seleted). Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested by running Letters.t. Also tested SendAlerts from the interface with AutoEmailOpacUser and memberentry (adding new patron).
From Jenkins: # Failed test 'Successfully sent claim' # at t/db_dependent/Letters.t line 431. # got: undef # expected: '1' # Looks like you failed 1 test of 74. [15:18:31] t/db_dependent/Letters.t .................................. By returning 1, you will resolve this issue on Jenkins. But the change itself is somewhat obscure now. Looking further, we never really defined what SendAlerts should really return. In most cases we call like: $err=SendAlerts(...) In some cases SendAlerts warns and returns undef on an error. Or carps and returns { error => ... } Another line in Letters.t tests the results of SendAlerts with is($err2, "", "Successfully sent serial notification"); Added a follow-up to return 1 on success and add some consistency on the sendmail calls in SendAlerts. Adjusted the one line in Letters.t. Passed QA
Pushed to Master - Should be in the November 16.11 Release. Thanks!
Pushed in 16.05. Will be in 16.05.05.
Pushed in 3.22.x, will be in 3.22.12