Summary: | basic_workflow.t is failing on slow servers | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, lucas, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.05.00,23.11.04,23.05.10
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 25551 | ||
Attachments: | Bug 32671: Prevent selenium/basic_workflow.t to fail if run on slow servers |
Description
Jonathan Druart
2023-01-18 09:12:57 UTC
Koha_Master/2516 koha_1 | CP main = 3.14 koha_1 | CP add patron category = 5.06 koha_1 | koha_1 | # Failed test at t/db_dependent/selenium/basic_workflow.t line 122. koha_1 | Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 125. koha_1 | # 'Add patron (test cat description) › Patrons › Koha' koha_1 | # doesn't match '(?^u:Patron details for test_patron_surname)' koha_1 | CP add patron = 8.83 koha_1 | CP add biblio = 0.23 Koha_Master/2530 koha_1 | CP main = 3.30 koha_1 | koha_1 | # Failed test at t/db_dependent/selenium/basic_workflow.t line 113. koha_1 | Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 125. koha_1 | # 'Patron categories › Administration › Koha' koha_1 | # doesn't match '(?^u:New category)' koha_1 | koha_1 | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} koha_1 | /usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try koha_1 | (eval 1858):1 in Selenium::Remote::Driver::__ANON__ koha_1 | (eval 1860):2 in Selenium::Remote::Driver::__ANON__ koha_1 | /usr/share/perl5/Selenium/Remote/Driver.pm:1340 in Selenium::Remote::Driver::_execute_command koha_1 | /usr/share/perl5/Selenium/Remote/Driver.pm:1340 in (eval) koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:117 in Selenium::Remote::Driver::find_element koha_1 | t/db_dependent/selenium/basic_workflow.t:114 in t::lib::Selenium::fill_form Koha_Master/2535 koha_1 | CP main = 3.84 koha_1 | koha_1 | # Failed test at t/db_dependent/selenium/basic_workflow.t line 113. koha_1 | Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 125. koha_1 | # 'Patron categories › Administration › Koha' koha_1 | # doesn't match '(?^u:New category)' koha_1 | koha_1 | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} koha_1 | /usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try koha_1 | (eval 1858):1 in Selenium::Remote::Driver::__ANON__ koha_1 | (eval 1860):2 in Selenium::Remote::Driver::__ANON__ koha_1 | /usr/share/perl5/Selenium/Remote/Driver.pm:1340 in Selenium::Remote::Driver::_execute_command koha_1 | /usr/share/perl5/Selenium/Remote/Driver.pm:1340 in (eval) koha_1 | /kohadevbox/koha/t/lib/Selenium.pm:117 in Selenium::Remote::Driver::find_element koha_1 | t/db_dependent/selenium/basic_workflow.t:114 in t::lib::Selenium::fill_form Koha_Master/2537 koha_1 | CP main = 3.56 koha_1 | koha_1 | # Failed test at t/db_dependent/selenium/basic_workflow.t line 113. koha_1 | Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 125. koha_1 | # 'Patron categories › Administration › Koha' koha_1 | # doesn't match '(?^u:New category)' koha_1 | CP add patron category = 11.80 koha_1 | CP add patron = 5.86 koha_1 | CP add biblio = 0.32 Koha_Master/2544 koha_1 | CP add items = 14.97 koha_1 | CP checkout = 8.63 koha_1 | CP checkin = 7.90 koha_1 | koha_1 | # Failed test at t/db_dependent/selenium/basic_workflow.t line 279. koha_1 | # got: '1' koha_1 | # expected: '2' koha_1 | CP holds = 15.34 We have another of these in run #2808: koha_1 | # Failed test at t/db_dependent/selenium/basic_workflow.t line 122. koha_1 | Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 125. koha_1 | # 'Add patron (test cat description) › Patrons › Koha' koha_1 | # doesn't match '(?^u:Patron details for test_patron_surname)' Help much appreciated! Created attachment 163047 [details] [review] Bug 32671: Prevent selenium/basic_workflow.t to fail if run on slow servers When submitting the form to create a new patron we are doing a POST memberentry.pl that is redirecting to moremember.pl The selenium test is expecting for the end of the request to test the page's title against "Patron details for ". But it's only waiting for the POST response (302), not the GET moremember that will display the patron's details. You can simulate a slow server using cpulimit: `cpulimit -b -p $PID -l 1` replacing $PID with the pid of the starman process. Note that other tests are failing using 1%, but... baby steps. The current failre: # Failed test at t/db_dependent/selenium/basic_workflow.t line 122 Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 125 # 'Add patron (test cat description) › Patrons › Koha' # doesn't match '(?^u:Patron details for test_patron_surname)' The next one (NOT fixed by this patch): # Failed test at t/db_dependent/selenium/basic_workflow.t line 256. # ' # # Checkouts (0)# # '# doesn't match '(?^u:Checkouts \(1\))' t/db_dependent/selenium/basic_workflow.t .. 14/22 # Failed test at t/db_dependent/selenium/basic_workflow.t line 256. # ' # # Checkouts (1) # # ' # doesn't match '(?^u:Checkouts \(2\))' t/db_dependent/selenium/basic_workflow.t .. 16/22 # Failed test at t/db_dependent/selenium/basic_workflow.t line 256. # ' # # Checkouts (2) # # ' # doesn't match '(?^u:Checkouts \(3\))' We are loosing a test (the form submission redirect to the patron's details), but it's not worth spending more time here IMO. Also taking this one for master. Sue me ;) Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.04 Backported to 23.05.x for upcoming 23.05.10. Reappeared? Koha_Master/2818 koha_1 | CP add items = 16.87 koha_1 | CP checkout = 12.84 koha_1 | CP checkin = 9.72 koha_1 | koha_1 | # Failed test at t/db_dependent/selenium/basic_workflow.t line 281. koha_1 | # got: '1' koha_1 | # expected: '2' koha_1 | CP holds = 14.88 selenium_1 | 1710957630124 Marionette INFO Stopped listening on port 35023 selenium_1 | JavaScript error: resource:///modules/Interactions.jsm, line 230: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUserIdleService.removeIdleObserver] selenium_1 | 18:00:31.171 INFO [ActiveSessions$1.onStop] - Removing session baac1e07-489d-47e6-a32c-f7e8b2da51d5 (org.openqa.selenium.firefox.GeckoDriverService) koha_1 | # Looks like you failed 1 test of 22. koha_1 | [18:00:31] t/db_dependent/selenium/basic_workflow.t |