1 # This test was contributed by Fedor Soreks, Jan 2007.
6 plan skip_all => "You must set \$ENV{LONG_TESTS} >= 2 to run the superlong tests"
7 unless $ENV{LONG_TESTS} && $ENV{LONG_TESTS} >= 2;
10 use t::common qw( new_fh );
14 use_ok( 'DBM::Deep' );
16 diag "This test can take up to several hours to run. Please be VERY patient.";
18 my ($fh, $filename) = new_fh();
19 my $db = DBM::Deep->new(
21 type => DBM::Deep->TYPE_HASH,
29 my $max_keys = 4_000_000;
30 my $max_record_keys = 10;
32 for my $key_no ( 0 .. $max_keys ) {
33 for my $rec_no ( 0 .. $max_record_keys ) {
34 $db->{"key_$key_no"}{"rec_key_$rec_no"} = "rec_val_$rec_no";
38 print "$key_no: $s\n";
40 if ( $s > $gigs * 2**30) {
41 fail "DB file ($filename) size exceeds $gigs GB";
46 ok( 1, "We passed the test!" );