Bug 29565

Summary: selenium/regressions.t can fail on slow boxes
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers
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:
21.11.00
Bug Depends on:    
Bug Blocks: 25551    
Attachments: Bug 29565: Prevent regressions.t to fail on slow boxes

Description Jonathan Druart 2021-11-24 08:26:06 UTC
#   Failed test 'Encoding in session variables'
#   at t/db_dependent/selenium/regressions.t line 300.
Can't call method "get_text" on an undefined value at t/db_dependent/selenium/regressions.t line 285.
Comment 1 Jonathan Druart 2021-11-24 08:28:59 UTC
Created attachment 127972 [details] [review]
Bug 29565: Prevent regressions.t to fail on slow boxes

It's failing randomly on some Jenkins' nodes

 #   Failed test 'Encoding in session variables'
 #   at t/db_dependent/selenium/regressions.t line 300.
 Can't call method "get_text" on an undefined value at t/db_dependent/selenium/regressions.t line 285.

It can be recreated locally with the following changes:
@ t/lib/Selenium.pm:50 @ sub new {
     );
     bless $self, $class;
     $self->add_error_handler;
-    $self->driver->set_implicit_wait_timeout(5000);
+    $self->driver->set_implicit_wait_timeout(1000);
     return $self;
 }

@ t/lib/Selenium.pm:50 @ sub new {
     );
     bless $self, $class;
     $self->add_error_handler;
-    $self->driver->set_implicit_wait_timeout(5000);
+    $self->driver->set_implicit_wait_timeout(1000);
     return $self;
 }

This patch suggests to simply double the timeout.
Comment 2 Jonathan Druart 2021-11-24 08:37:01 UTC
Patch pushed to master for 21.11.00
Comment 3 Jonathan Druart 2022-01-13 04:52:08 UTC
Not fixed, Koha_Master/1885

00:58:27 koha_1       |     # Looks like you planned 18 tests but ran 1.
00:58:27 koha_1       | 
00:58:27 koha_1       | #   Failed test 'Encoding in session variables'
00:58:27 koha_1       | #   at t/db_dependent/selenium/regressions.t line 300.
00:58:27 koha_1       | Can't call method "get_text" on an undefined value at t/db_dependent/selenium/regressions.t line 285.
00:58:27 koha_1       | # Looks like your test exited with 2 just after 6.
00:58:27 koha_1       | [23:58:24] t/db_dependent/selenium/regressions.t
Comment 4 Jonathan Druart 2022-01-13 04:52:36 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2023-05-25 09:59:08 UTC
Koha_Master/2531

22:21:45 koha_1       |     # Looks like you planned 18 tests but ran 15.
22:21:45 koha_1       | 
22:21:45 koha_1       | #   Failed test 'Encoding in session variables'
22:21:45 koha_1       | #   at t/db_dependent/selenium/regressions.t line 340.
22:21:45 koha_1       | Can't call method "get_text" on an undefined value at t/db_dependent/selenium/regressions.t line 325.
Comment 6 Jonathan Druart 2023-06-07 10:00:44 UTC
Koha_22.11_D11/188

11:21:22 koha_1       | Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156.
11:21:22 koha_1       | Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156.
11:21:22 koha_1       |     # Looks like you planned 18 tests but ran 7.
11:21:22 koha_1       | 
11:21:22 koha_1       | #   Failed test 'Encoding in session variables'
11:21:22 koha_1       | #   at t/db_dependent/selenium/regressions.t line 340.
11:21:22 koha_1       | Can't call method "get_text" on an undefined value at t/db_dependent/selenium/regressions.t line 325.
11:21:22 koha_1       | # Looks like your test exited with 11 just after 7.