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:
parent
c2c5004066
commit
fab29f7fd4
1 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue