5 # XXX obviously, the guts of this test haven't been written yet --blblack
9 plan skip_all => 'Set $ENV{DBICTEST_STORAGE_STRESS} to run this test'
10 . ' (it is very resource intensive!)'
11 unless $ENV{DBICTEST_STORAGE_STRESS};
15 my @KILL_RATES = qw/0 0.001 0.01 0.1 0.2 0.5 0.75 1.0/;
17 # Stress the storage with these parameters...
19 my ($connect_info, $num_kids, $cycles, $kill_rate) = @_;
21 foreach my $cycle (1..$cycles) {
22 my $schema = DBICTest::Schema->connection(@$connect_info, { AutoCommit => 1 });
23 foreach my $kidno (1..$num_kids) {
29 # Get a set of connection information -
30 # whatever the user has supplied for the vendor-specific tests
31 sub get_connect_infos {
33 foreach my $db_prefix (qw/PG MYSQL DB2 MSSQL ORA/) {
35 map { "DBICTEST_${db_prefix}_${_}" } qw/DSN USER PASS/
37 push(@connect_infos, \@conn_info) if $conn_info[0];
42 my $connect_infos = get_connect_infos();
44 plan skip_all => 'This test needs some non-sqlite connect info!'
45 unless @$connect_infos;
47 plan tests => (1 * @$connect_infos * $NKIDS * $CYCLES * @KILL_RATES) + 1;
49 use_ok('DBICTest::Schema');
51 foreach my $connect_info (@$connect_infos) {
52 foreach my $kill_rate (@KILL_RATES) {
53 stress_storage($connect_info, $NKIDS, $CYCLES, $kill_rate);