Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d77fcba

Browse files
committed
truncate test
1 parent 412e755 commit d77fcba

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

t/000_vacuum_full._pl renamed to t/000_truncate.pl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
my @bench_argv = (
3636
'pgbench',
37-
'-T 30',
37+
"-T $seconds",
3838
'-N',
3939
'-c 8',
4040
-h => $cluster->{nodes}->[0]->host(),
@@ -47,11 +47,14 @@
4747
my $started = time();
4848
while (time() - $started < $seconds)
4949
{
50-
($rc, $out, $err) = $cluster->psql(2, 'postgres', "vacuum full;");
51-
sleep(1);
50+
($rc, $out, $err) = $cluster->psql(1, 'postgres', "truncate pgbench_history;");
51+
($rc, $out, $err) = $cluster->psql(1, 'postgres', "vacuum full");
52+
($rc, $out, $err) = $cluster->psql(0, 'postgres', "truncate pgbench_history;");
53+
($rc, $out, $err) = $cluster->psql(0, 'postgres', "vacuum full");
54+
sleep(0.5);
5255
}
5356

54-
finish($bench_run) || BAIL_OUT("pgbench exited with $?");
57+
finish($bench_run) || $cluster->bail_out_with_logs("pgbench exited with $?");
5558
sleep(1);
5659
ok($cluster->stop('fast'), "cluster stops");
5760
1;

0 commit comments

Comments
 (0)