Bugzilla – Attachment 53946 Details for
Bug 16579
[OMNIBUS] Use separate memcached namespace for caching koha-conf.xml
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug XXXXX_2: Add the ability to define several namespaces - tests
Bug-XXXXX2-Add-the-ability-to-define-several-names.patch (text/plain), 1.82 KB, created by
Jonathan Druart
on 2016-08-03 14:25:08 UTC
(
hide
)
Description:
Bug XXXXX_2: Add the ability to define several namespaces - tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-03 14:25:08 UTC
Size:
1.82 KB
patch
obsolete
>From 25d3237a0198c270b6006a5bd841b44f5cc197c7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 22 Jun 2016 16:10:23 +0100 >Subject: [PATCH] Bug XXXXX_2: Add the ability to define several namespaces - > tests > >https://bugs.koha-community.org/show_bug.cgi?id=16579 >--- > t/Cache.t | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > >diff --git a/t/Cache.t b/t/Cache.t >index 1a25b77..759e993 100644 >--- a/t/Cache.t >+++ b/t/Cache.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 42; >+use Test::More tests => 43; > use Test::Warn; > > my $destructorcount = 0; >@@ -256,6 +256,26 @@ subtest 'Koha::Cache::Memory::Lite' => sub { > undef, "fetching flushed item from cache" ); > }; > >+subtest 'Koha::Caches' => sub { >+ plan tests => 8; >+ my $default_cache = Koha::Cache->get_instance(); >+ my $another_cache = Koha::Cache->get_instance('another_cache'); >+ $default_cache->set_in_cache('key_a', 'value_a'); >+ $default_cache->set_in_cache('key_b', 'value_b'); >+ $another_cache->set_in_cache('key_a', 'another_value_a'); >+ $another_cache->set_in_cache('key_b', 'another_value_b'); >+ is( $default_cache->get_from_cache('key_a'), 'value_a' ); >+ is( $another_cache->get_from_cache('key_a'), 'another_value_a' ); >+ is( $default_cache->get_from_cache('key_b'), 'value_b' ); >+ is( $another_cache->get_from_cache('key_b'), 'another_value_b' ); >+ $another_cache->clear_from_cache('key_b'); >+ is( $default_cache->get_from_cache('key_b'), 'value_b' ); >+ is( $another_cache->get_from_cache('key_b'), undef ); >+ $another_cache->flush_all(); >+ is( $default_cache->get_from_cache('key_a'), 'value_a' ); >+ is( $another_cache->get_from_cache('key_a'), undef ); >+}; >+ > END { > SKIP: { > $ENV{ MEMCACHED_NAMESPACE } = 'unit_tests'; >-- >2.8.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 16579
:
52705
|
52706
|
52707
|
52708
|
52709
|
52710
|
52711
|
53945
|
53946
|
53947
|
53948
|
53949
|
53950
|
53951
|
53952
|
53953
|
53954
|
53955
|
53956