Regression test for prune_db locking problem

This commit is contained in:
Jared Johnson 2015-03-05 18:34:59 -06:00
parent 4106da56d1
commit e98e1c2e82

View File

@ -264,6 +264,12 @@ sub test_prune_db {
is( $self->allkeys, '',
'prune_db() expires all remaining keys 37 days later' );
}
# Ensure prune_db does not leave the database locked after doing nothing
delete $self->{db};
$self->db( class => 'Qpsmtpd::DB::File::DBM', dir => 't/tmp' );
$self->prune_db;
$self->prune_db;
ok(1, "We won't get this far if prune_db leaves the database locked");
}
sub allkeys {