Lines 15-21
Link Here
|
15 |
# with Koha; if not, see <http://www.gnu.org/licenses>. |
15 |
# with Koha; if not, see <http://www.gnu.org/licenses>. |
16 |
|
16 |
|
17 |
use Modern::Perl; |
17 |
use Modern::Perl; |
18 |
use Test::More tests => 17; |
18 |
use Test::More tests => 18; |
19 |
use Test::Warn; |
19 |
use Test::Warn; |
20 |
use MARC::Record; |
20 |
use MARC::Record; |
21 |
|
21 |
|
Lines 118-132
else {
Link Here
|
118 |
"Expected failure because of missing PDF::FromHTML."; |
118 |
"Expected failure because of missing PDF::FromHTML."; |
119 |
} |
119 |
} |
120 |
|
120 |
|
121 |
# FIXME |
121 |
# FIXME Should be a Koha::Object object |
122 |
# At this point, there is a problem with the AutoCommit off |
122 |
is( ref(Koha::Patron::Discharge::request({ borrowernumber => $patron->{borrowernumber} })), 'Koha::Schema::Result::Discharge', 'Discharge request sent' ); |
123 |
# The transaction is bloked into DBIx::Class::Storage::DBI::_dbh_execute |
|
|
124 |
# line my $rv = $sth->execute(); |
125 |
# We are using 2 connections and the one used by Koha::Schema has the AutoCommit set to 1 |
126 |
# Even if we switch off this flag, the connection will be blocked. |
127 |
# The error is: |
128 |
# DBIx::Class::ResultSet::create(): DBI Exception: DBD::mysql::st execute failed: Lock wait timeout exceeded; try restarting transaction [for Statement "INSERT INTO discharges ( borrower, needed, validated) VALUES ( ?, ?, ? )" with ParamValues: 0='121', 1='2014-01-08T16:38:29', 2=undef] at /home/koha/src/Koha/DataObject/Discharge.pm line 33 |
129 |
#is( Koha::Service::Borrower::Discharge::request({ borrowernumber => $patron->{borrowernumber} }), 1, 'Discharge request sent' ); |
130 |
|
123 |
|
131 |
$schema->storage->txn_rollback; |
124 |
$schema->storage->txn_rollback; |
132 |
|
125 |
|
133 |
- |
|
|