Bugzilla – Attachment 108782 Details for
Bug 25811
authentication.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25811: Add debug info to authentication.t
Bug-25811-Add-debug-info-to-authenticationt.patch (text/plain), 2.01 KB, created by
Jonathan Druart
on 2020-08-21 08:51:05 UTC
(
hide
)
Description:
Bug 25811: Add debug info to authentication.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-08-21 08:51:05 UTC
Size:
2.01 KB
patch
obsolete
>From ef039575a524c922127f81fb2dacfc91bf80b077 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 21 Aug 2020 10:49:42 +0200 >Subject: [PATCH] Bug 25811: Add debug info to authentication.t > >Trying to know if the logged in patron is the one we are expecting to >(well, we are not expecting anybody to be logged in at this point!) >--- > t/db_dependent/selenium/authentication.t | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/selenium/authentication.t b/t/db_dependent/selenium/authentication.t >index 418346a202..20df9047fb 100644 >--- a/t/db_dependent/selenium/authentication.t >+++ b/t/db_dependent/selenium/authentication.t >@@ -97,7 +97,25 @@ SKIP: { > $driver->find_element('//a[@id="user-menu"]')->click; > $driver->find_element('//a[@id="logout"]')->click; > $driver->get($mainpage); # This should not be needed but we the next find_element fails randomly >- $driver->find_element('//div[@id="login"]'); # logged out >+ { # Temporary debug >+ $driver->error_handler( >+ sub { >+ my ( $driver, $selenium_error ) = @_; >+ print STDERR "\nSTRACE:"; >+ my $i = 1; >+ while ( (my @call_details = (caller($i++))) ){ >+ print STDERR "\t" . $call_details[1]. ":" . $call_details[2] . " in " . $call_details[3]."\n"; >+ } >+ print STDERR "\n"; >+ print STDERR sprintf("Is logged in patron: %s (%s)?\n", $patron->surname, $patron->othernames ); >+ $s->capture( $driver ); >+ croak $selenium_error; >+ } >+ ); >+ >+ $driver->find_element('//div[@id="login"]'); # logged out >+ $s->add_error_handler; # Reset to the default error handler >+ } > > # Using the form on the right > $s->fill_form( { userid => $patron->userid, password => $password } ); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25811
:
107414
|
107444
|
107635
|
107716
|
108782
|
108796