Bugzilla – Attachment 50709 Details for
Bug 16166
Improve L1 cache performance and safety
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16166: Fix t/Cache.t tests
Bug-16166-Fix-tCachet-tests.patch (text/plain), 2.56 KB, created by
Jacek Ablewicz
on 2016-04-26 07:08:28 UTC
(
hide
)
Description:
Bug 16166: Fix t/Cache.t tests
Filename:
MIME Type:
Creator:
Jacek Ablewicz
Created:
2016-04-26 07:08:28 UTC
Size:
2.56 KB
patch
obsolete
>From 226b7fcadacf79db89c95bbc9dde85dd5d9487b9 Mon Sep 17 00:00:00 2001 >From: Jacek Ablewicz <abl@biblos.pk.edu.pl> >Date: Tue, 26 Apr 2016 09:04:17 +0200 >Subject: [PATCH] Bug 16166: Fix t/Cache.t tests > >Thou shalt not forget to include changes made in the t/Cache.t >in the patch set. >--- > t/Cache.t | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > >diff --git a/t/Cache.t b/t/Cache.t >index 5a5c248..4f56807 100644 >--- a/t/Cache.t >+++ b/t/Cache.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 40; >+use Test::More tests => 39; > > my $destructorcount = 0; > >@@ -33,7 +33,7 @@ SKIP: { > $ENV{ MEMCACHED_NAMESPACE } = 'unit_tests'; > my $cache = Koha::Cache->get_instance(); > >- skip "Cache not enabled", 33 >+ skip "Cache not enabled", 35 > unless ( $cache->is_cache_active() && defined $cache ); > > # test fetching an item that isnt in the cache >@@ -189,7 +189,7 @@ SKIP: { > > $item_from_cache = $cache->get_from_cache('test_deep_copy_array', { unsafe => 1 }); > @$item_from_cache = qw( another array ref ); >- is_deeply( $cache->get_from_cache('test_deep_copy_array'), [ qw ( another array ref ) ], 'An array will not be deep copied if the unsafe flag is set'); >+ is_deeply( $cache->get_from_cache('test_deep_copy_array', { unsafe => 1 }), [ qw ( another array ref ) ], 'An array will not be deep copied if the unsafe flag is set'); > # Hash > my %item = ( a => 'hashref' ); > $cache->set_in_cache('test_deep_copy_hash', \%item); >@@ -201,13 +201,10 @@ SKIP: { > is_deeply( $cache->get_from_cache('test_deep_copy_hash'), { a => 'hashref' }, 'A hash will be deep copied when set in cache'); > > %item = ( a => 'hashref' ); >- $cache->set_in_cache('test_deep_copy_hash', \%item, { unsafe => 1}); >- %item = ( a_modified => 'hashref' ); >- is_deeply( $cache->get_from_cache('test_deep_copy_hash'), { a_modified => 'hashref' }, 'A hash will not be deep copied when set in cache if the unsafe flag is set'); >- >- $item_from_cache = $cache->get_from_cache('test_deep_copy_hash', { unsafe => 1}); >+ $cache->set_in_cache('test_deep_copy_hash', \%item); >+ $item_from_cache = $cache->get_from_cache('test_deep_copy_hash', { unsafe => 1 }); > %$item_from_cache = ( another => 'hashref' ); >- is_deeply( $cache->get_from_cache('test_deep_copy_hash'), { another => 'hashref' }, 'A hash will not be deep copied if the unsafe flag is set'); >+ is_deeply( $cache->get_from_cache('test_deep_copy_hash', { unsafe => 1 }), { another => 'hashref' }, 'A hash will not be deep copied if the unsafe flag is set'); > } > > END { >-- >1.7.10.4
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 16166
:
49670
|
49729
|
49730
|
49739
|
50192
|
50708
|
50709
|
51763
|
51764
|
51765
|
52246
|
52265
|
52266
|
52509
|
52510
|
52863
|
52864