Skip to content

Commit

Permalink
fixes for memory_cached test
Browse files Browse the repository at this point in the history
  • Loading branch information
julsemaan authored and louismunro committed May 24, 2017
1 parent 309020c commit f04d59a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t/unittest/pfconfig/memory_cached.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use strict;
use warnings;
BEGIN {
use lib qw(/usr/local/pf/t /usr/local/pf/lib);
use test_paths;
use setup_test_config;
}

Expand All @@ -27,11 +28,13 @@ use_ok("pfconfig::manager");

my $testkey = "testkey";
my $testns = "testns";
my $testns2 = "testns2";

my $mem = pfconfig::memory_cached->new($testns);

my $manager = pfconfig::manager->new();
$manager->touch_cache($testns);
$manager->touch_cache($testns2);

my $result;

Expand All @@ -49,7 +52,6 @@ $result = $mem->compute_from_subcache($testkey, sub {"value changed !"});
is($result, "value changed !",
"Value is properly recompute_from_subcached when namespace expired.");

my $testns2 = "testns2";
$mem = pfconfig::memory_cached->new($testns, $testns2);

$result = $mem->compute_from_subcache($testkey, sub {"dinde"});
Expand Down

0 comments on commit f04d59a

Please sign in to comment.