Bug 24881 - Circulation.t still fails if tests are ran slowly
Summary: Circulation.t still fails if tests are ran slowly
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 22917
Blocks:
  Show dependency treegraph
 
Reported: 2020-03-16 16:19 UTC by Jonathan Druart
Modified: 2020-04-03 20:15 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 24881: [19.05.x] Try to fix random failure from Circulation.t (5.63 KB, patch)
2020-03-16 16:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24881: Try to fix random failure from Circulation.t (11.70 KB, patch)
2020-03-18 16:20 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2020-03-16 16:19:08 UTC
Bug 22917 - Circulation.t fails if tests are ran slowly

Not fixed, or regression added after.
Comment 1 Jonathan Druart 2020-03-16 16:20:07 UTC
Created attachment 100778 [details] [review]
Bug 24881: [19.05.x] Try to fix random failure from Circulation.t
Comment 2 Jonathan Druart 2020-03-16 16:32:04 UTC
Lucas, if you can recreate that one, could you confirm this patch fixes the failures on 19.05?
Comment 3 Lucas Gass 2020-03-16 16:45:43 UTC
Jonathan, I still get this: 

# Subtest: CanBookBeRenewed tests
    1..71
DBD::mysql::st execute failed: Unknown column 'me.guarantorid' in 'field list' [for Statement "SELECT `me`.`borrowernumber`, `me`.`cardnumber`, `me`.`surname`, `me`.`firstname`, `me`.`title`, `me`.`othernames`, `me`.`initials`, `me`.`streetnumber`, `me`.`streettype`, `me`.`address`, `me`.`address2`, `me`.`city`, `me`.`state`, `me`.`zipcode`, `me`.`country`, `me`.`email`, `me`.`phone`, `me`.`mobile`, `me`.`fax`, `me`.`emailpro`, `me`.`phonepro`, `me`.`B_streetnumber`, `me`.`B_streettype`, `me`.`B_address`, `me`.`B_address2`, `me`.`B_city`, `me`.`B_state`, `me`.`B_zipcode`, `me`.`B_country`, `me`.`B_email`, `me`.`B_phone`, `me`.`dateofbirth`, `me`.`branchcode`, `me`.`categorycode`, `me`.`dateenrolled`, `me`.`dateexpiry`, `me`.`date_renewed`, `me`.`gonenoaddress`, `me`.`lost`, `me`.`debarred`, `me`.`debarredcomment`, `me`.`contactname`, `me`.`contactfirstname`, `me`.`contacttitle`, `me`.`guarantorid`, `me`.`borrowernotes`, `me`.`relationship`, `me`.`sex`, `me`.`password`, `me`.`flags`, `me`.`userid`, `me`.`opacnote`, `me`.`contactnote`, `me`.`sort1`, `me`.`sort2`, `me`.`altcontactfirstname`, `me`.`altcontactsurname`, `me`.`altcontactaddress1`, `me`.`altcontactaddress2`, `me`.`altcontactaddress3`, `me`.`altcontactstate`, `me`.`altcontactzipcode`, `me`.`altcontactcountry`, `me`.`altcontactphone`, `me`.`smsalertnumber`, `me`.`sms_provider_id`, `me`.`privacy`, `me`.`privacy_guarantor_checkouts`, `me`.`checkprevcheckout`, `me`.`updated_on`, `me`.`lastseen`, `me`.`lang`, `me`.`login_attempts`, `me`.`overdrive_auth_token`, `me`.`anonymized` FROM `borrowers` `me` WHERE ( `me`.`borrowernumber` = ? )" with ParamValues: 0='84'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.
    # No tests run!
not ok 15 - No tests run for subtest "CanBookBeRenewed tests"

#   Failed test 'No tests run for subtest "CanBookBeRenewed tests"'
#   at /kohadevbox/koha/t/db_dependent/Circulation.t line 998.
DBD::mysql::st execute failed: Unknown column 'me.guarantorid' in 'field list' [for Statement "SELECT `me`.`borrowernumber`, `me`.`cardnumber`, `me`.`surname`, `me`.`firstname`, `me`.`title`, `me`.`othernames`, `me`.`initials`, `me`.`streetnumber`, `me`.`streettype`, `me`.`address`, `me`.`address2`, `me`.`city`, `me`.`state`, `me`.`zipcode`, `me`.`country`, `me`.`email`, `me`.`phone`, `me`.`mobile`, `me`.`fax`, `me`.`emailpro`, `me`.`phonepro`, `me`.`B_streetnumber`, `me`.`B_streettype`, `me`.`B_address`, `me`.`B_address2`, `me`.`B_city`, `me`.`B_state`, `me`.`B_zipcode`, `me`.`B_country`, `me`.`B_email`, `me`.`B_phone`, `me`.`dateofbirth`, `me`.`branchcode`, `me`.`categorycode`, `me`.`dateenrolled`, `me`.`dateexpiry`, `me`.`date_renewed`, `me`.`gonenoaddress`, `me`.`lost`, `me`.`debarred`, `me`.`debarredcomment`, `me`.`contactname`, `me`.`contactfirstname`, `me`.`contacttitle`, `me`.`guarantorid`, `me`.`borrowernotes`, `me`.`relationship`, `me`.`sex`, `me`.`password`, `me`.`flags`, `me`.`userid`, `me`.`opacnote`, `me`.`contactnote`, `me`.`sort1`, `me`.`sort2`, `me`.`altcontactfirstname`, `me`.`altcontactsurname`, `me`.`altcontactaddress1`, `me`.`altcontactaddress2`, `me`.`altcontactaddress3`, `me`.`altcontactstate`, `me`.`altcontactzipcode`, `me`.`altcontactcountry`, `me`.`altcontactphone`, `me`.`smsalertnumber`, `me`.`sms_provider_id`, `me`.`privacy`, `me`.`privacy_guarantor_checkouts`, `me`.`checkprevcheckout`, `me`.`updated_on`, `me`.`lastseen`, `me`.`lang`, `me`.`login_attempts`, `me`.`overdrive_auth_token`, `me`.`anonymized` FROM `borrowers` `me` WHERE ( `me`.`borrowernumber` = ? )" with ParamValues: 0='84'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.
# Looks like your test exited with 11 just after 15.
Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 32/46 subtests
Comment 4 Jonathan Druart 2020-03-16 18:23:15 UTC
Lucas, this means that you are using a master DB on a 19.05.x branch.
reset_all on 19.05.x and you should not get that error.
Comment 5 Lucas Gass 2020-03-16 19:46:14 UTC
ahh, of course. Thanks Jonathan.
Comment 6 Lucas Gass 2020-03-16 19:52:26 UTC
backported to 19.05.x for 19.05.09
Comment 7 Jonathan Druart 2020-03-16 19:56:55 UTC
(In reply to Lucas Gass from comment #6)
> backported to 19.05.x for 19.05.09

Can you confirm this patch did fix something?

Which error did you get?
Comment 8 Lucas Gass 2020-03-16 19:58:29 UTC
Jonathan, no errors. This makes Circulation.t pass all tests. TY.
Comment 9 Jonathan Druart 2020-03-17 08:01:14 UTC
(In reply to Lucas Gass from comment #8)
> Jonathan, no errors. This makes Circulation.t pass all tests. TY.

I do not understand what happened here.

What are the failing tests this patch fixed? It's not supposed to fix the failures you reported on comment 3.

If other tests are fixed we need to have the patch into master as well.
Comment 10 Lucas Gass 2020-03-17 14:44:26 UTC
Sorry Jonathan,

It fixes Circulation.t tests for me, the problems in comment 3 were my own problem. I wrongly assumed this one was for [19.05.x] only so I pushed to that branch.

I will revert.
Comment 11 Jonathan Druart 2020-03-18 16:07:56 UTC
I forgot if this test was really failing. Holding on for now, until it reappears.
Comment 12 Jonathan Druart 2020-03-18 16:20:38 UTC
Created attachment 100970 [details] [review]
Bug 24881: Try to fix random failure from Circulation.t

This is a follow-up of bug 22917.
Comment 13 Jonathan Druart 2020-03-18 16:21:50 UTC
Sending to RM queue.
Comment 14 Martin Renvoize 2020-03-18 16:30:11 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 15 Joy Nelson 2020-04-03 20:15:40 UTC
does not apply to 19.11.x.  not backported.  please rebase if needed.