Bug 24022: Prevent Session2.t to fail if run after Session.t

Cache must be cleaned!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-11-12 17:15:35 +01:00 committed by Martin Renvoize
parent c2c5004066
commit fab29f7fd4
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -17,6 +17,9 @@ my $schema = Koha::Database->new->schema;
$schema->storage->txn_begin; $schema->storage->txn_begin;
# Clear the cache, before and after
Koha::Caches->get_instance->flush_all;
subtest 'add_item_status' => sub { subtest 'add_item_status' => sub {
plan tests => 2; plan tests => 2;
@ -40,10 +43,6 @@ subtest 'add_item_status' => sub {
} }
}); });
# Clear the cache to make sure the above values take effect
my $cache = Koha::Caches->get_instance();
$cache->flush_all();
## FIRST ITEM HAS ALL THE STATUSES ## ## FIRST ITEM HAS ALL THE STATUSES ##
my $item_1 = $builder->build({ my $item_1 = $builder->build({
source => 'Item', source => 'Item',
@ -89,4 +88,7 @@ subtest 'add_item_status' => sub {
}; };
# Clear the cache, before and after
Koha::Caches->get_instance->flush_all;
$schema->storage->txn_rollback; $schema->storage->txn_rollback;