Skip to content

Commit 3cb45fa

Browse files
committed
more concurrency in 004_recovery.pl
1 parent b4a245b commit 3cb45fa

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: t/004_recovery.pl

+8-2
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@
8686
$cluster->pgbench(2, ('-N', -T => '1') );
8787

8888
# kill node while neighbour is under load
89-
my $pgb_handle = $cluster->pgbench_async(1, ('-N', -T => '20') );
89+
my $pgb_handle = $cluster->pgbench_async(1, ('-N', -T => '20', -c => '5') );
9090
sleep(5);
9191
$cluster->{nodes}->[2]->stop('fast');
9292
$cluster->pgbench_await($pgb_handle);
9393

9494
# start node while neighbour is under load
95-
$pgb_handle = $cluster->pgbench_async(0, ('-N', -T => '20') );
95+
$pgb_handle = $cluster->pgbench_async(0, ('-N', -T => '20', -c => '5') );
9696
sleep(5);
9797
$cluster->{nodes}->[2]->start;
9898
$cluster->pgbench_await($pgb_handle);
@@ -115,6 +115,12 @@
115115
is($sum2, $sum0, "Check that sum_2 == sum_0");
116116
is($sum2, $sum1, "Check that sum_2 == sum_1");
117117

118+
$cluster->psql(0, 'postgres', "select count(*) from pg_prepared_xacts;", stdout => \$sum0);
119+
$cluster->psql(1, 'postgres', "select count(*) from pg_prepared_xacts;", stdout => \$sum1);
120+
$cluster->psql(2, 'postgres', "select count(*) from pg_prepared_xacts;", stdout => \$sum2);
121+
122+
note("Number of prepared tx: $sum0, $sum1, $sum2");
123+
118124
$cluster->{nodes}->[0]->stop('fast');
119125
$cluster->{nodes}->[1]->stop('fast');
120126
$cluster->{nodes}->[2]->stop('fast');

0 commit comments

Comments
 (0)