File: hash.t

package info (click to toggle)
libkiokudb-perl 0.57-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,396 kB
  • sloc: perl: 13,314; makefile: 12
file content (33 lines) | stat: -rw-r--r-- 847 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/perl

use Test::More;

use KiokuDB;
use KiokuDB::Backend::Hash;

use Cache::Ref::CLOCK;

use KiokuDB::Test;

foreach my $format ( qw(memory storable json), eval { require YAML::XS; "yaml" } ) {
    foreach my $keep_entries ( 1, 0 ) {
        foreach my $queue ( 1, 0 ) {
            foreach my $cache ( Cache::Ref::CLOCK->new( size => 100 ), undef ) {
                run_all_fixtures(
                    KiokuDB->connect(
                        "hash",
                        serializer => $format,
                        linker_queue => $queue,
                        live_objects => {
                            keep_entries => $keep_entries,
                            ( $cache ? ( cache => $cache ) : () ),
                        },
                    ),
                );
            }
        }
    }
}


done_testing;