#!/usr/bin/perl

use strict;
use warnings;

use lib "./lib";
use Benchmark qw( cmpthese );

use PS::IPP::IData::Client;

my $idata = PS::IPP::IData::Client->new(
    proxy   => 'http://localhost:80/idata'
);

my $key = "foobarbazbongbungbutufu";
cmpthese( 10, {
        'Image Server' => sub {
            {
                my $fh = $idata->create( $key );
                close $fh;
                $idata->unlock( $key, 'write' );
            }

            $idata->delete( $key );
        },
    },
    'all',
);
