Bugzilla – Attachment 85177 Details for
Bug 22349
Overzealous deletion of data in t/db_dependant/Koha/Acquisitions/Booksellers.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22349: Remove overzealous database deletions from test
Bug-22349-Remove-overzealous-database-deletions-fr.patch (text/plain), 2.44 KB, created by
Martin Renvoize (ashimema)
on 2019-02-15 14:43:19 UTC
(
hide
)
Description:
Bug 22349: Remove overzealous database deletions from test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-02-15 14:43:19 UTC
Size:
2.44 KB
patch
obsolete
>From 17805d48807b93d0cc1a863d4d675c3192c7e516 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 15 Feb 2019 14:40:34 +0000 >Subject: [PATCH] Bug 22349: Remove overzealous database deletions from test > >For no apparent reason a whole lot of data was being deleted inside a >transaction for each of the subtests in Koha/Acquisitions/Booksellers.t > >This patch simply remove the deletions. To test, run the test before and >after applying the patch and they should all continue to pass.. If you >have a large number of booksellers, baskets, orders or subscriptions in >your database you may also see an decrease in the time it takes to run >the test. >--- > t/db_dependent/Koha/Acquisition/Booksellers.t | 17 ----------------- > 1 file changed, 17 deletions(-) > >diff --git a/t/db_dependent/Koha/Acquisition/Booksellers.t b/t/db_dependent/Koha/Acquisition/Booksellers.t >index 010993e059..e3870cd9f8 100644 >--- a/t/db_dependent/Koha/Acquisition/Booksellers.t >+++ b/t/db_dependent/Koha/Acquisition/Booksellers.t >@@ -39,11 +39,6 @@ subtest '->baskets() tests' => sub { > > $schema->storage->txn_begin(); > >- # Delete existing data >- $schema->resultset('Aqorder')->delete(); >- $schema->resultset('Aqbasket')->delete(); >- Koha::Acquisition::Booksellers->delete(); >- $schema->resultset('Subscription')->delete(); > my $patron = $builder->build_object({ class => 'Koha::Patrons' }); > > my $vendor = $builder->build_object( { class => 'Koha::Acquisition::Booksellers' } ); >@@ -67,12 +62,6 @@ subtest '->subscriptions() tests' => sub { > > $schema->storage->txn_begin(); > >- # Delete existing data >- $schema->resultset('Aqorder')->delete(); >- $schema->resultset('Aqbasket')->delete(); >- Koha::Acquisition::Booksellers->delete(); >- $schema->resultset('Subscription')->delete(); >- > my $vendor = $builder->build_object( { class => 'Koha::Acquisition::Booksellers' } ); > is( $vendor->subscriptions->count, 0, 'Vendor has no subscriptions' ); > >@@ -154,12 +143,6 @@ subtest '->contacts() tests' => sub { > > $schema->storage->txn_begin(); > >- # Delete existing data >- $schema->resultset('Aqorder')->delete(); >- $schema->resultset('Aqbasket')->delete(); >- Koha::Acquisition::Booksellers->delete(); >- $schema->resultset('Subscription')->delete(); >- > my $vendor = $builder->build_object( { class => 'Koha::Acquisition::Booksellers' } ); > > is( $vendor->contacts->count, 0, 'Vendor has no contacts' ); >-- >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 22349
:
85177
|
85223
|
85233