Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions t/01-temp-files.t
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ SKIP: {

# unit test based on the file count => Returns OK
# The query generates between 17.5MB (9.4) and 11,7MB (14) of WAL
$node->psql('postgres', 'SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1;');
$node->psql('postgres', 'SELECT count(*) FROM (SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1) q;');

# The added sleep ensures that two tests are not executed within the same
# seconds.
Expand Down Expand Up @@ -104,7 +104,7 @@ SKIP: {
$t0 = [gettimeofday];

# unit test based on the file count => Returns WARN
$node->psql('postgres', 'SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1;');
$node->psql('postgres', 'SELECT count(*) FROM (SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1) q;');

usleep(100_000) while tv_interval($t0) < 1.01;
$node->command_checks_all( [
Expand Down Expand Up @@ -135,7 +135,7 @@ SKIP: {
$t0 = [gettimeofday];

# unit test based on the file count => Returns CRIT
$node->psql('postgres', 'SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1;');
$node->psql('postgres', 'SELECT count(*) FROM (SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1) q;');

usleep(100_000) while tv_interval($t0) < 1.01;
$node->command_checks_all( [
Expand Down Expand Up @@ -166,7 +166,7 @@ SKIP: {
$t0 = [gettimeofday];

# unit test based on the file size => Returns OK
$node->psql('postgres', 'SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1;');
$node->psql('postgres', 'SELECT count(*) FROM (SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1) q;');

usleep(100_000) while tv_interval($t0) < 1.01;
$node->command_checks_all( [
Expand Down Expand Up @@ -197,7 +197,7 @@ SKIP: {
$t0 = [gettimeofday];

# unit test based on the file size => Returns WARN
$node->psql('postgres', 'SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1;');
$node->psql('postgres', 'SELECT count(*) FROM (SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1) q;');

usleep(100_000) while tv_interval($t0) < 1.01;
$node->command_checks_all( [
Expand Down Expand Up @@ -228,7 +228,7 @@ SKIP: {
$t0 = [gettimeofday];

# unit test based on the file size => Returns CRIT
$node->psql('postgres', 'SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1;');
$node->psql('postgres', 'SELECT count(*) FROM (SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1) q;');

usleep(100_000) while tv_interval($t0) < 1.01;
$node->command_checks_all( [
Expand Down Expand Up @@ -259,7 +259,7 @@ SKIP: {
$t0 = [gettimeofday];

# unit test based on the file size and count => Returns OK
$node->psql('postgres', 'SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1;');
$node->psql('postgres', 'SELECT count(*) FROM (SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1) q;');

usleep(100_000) while tv_interval($t0) < 1.01;
$node->command_checks_all( [
Expand Down Expand Up @@ -290,7 +290,7 @@ SKIP: {
$t0 = [gettimeofday];

# unit test based on the file size and count => Returns WARN
$node->psql('postgres', 'SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1;');
$node->psql('postgres', 'SELECT count(*) FROM (SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1) q;');

usleep(100_000) while tv_interval($t0) < 1.01;
$node->command_checks_all( [
Expand Down Expand Up @@ -321,7 +321,7 @@ SKIP: {
$t0 = [gettimeofday];

# unit test based on the file size and count => Returns CRIT
$node->psql('postgres', 'SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1;');
$node->psql('postgres', 'SELECT count(*) FROM (SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1) q;');

usleep(100_000) while tv_interval($t0) < 1.01;
$node->command_checks_all( [
Expand Down Expand Up @@ -384,7 +384,7 @@ SKIP: {

$node->psql('postgres', q{
SET temp_tablespaces TO myts2;
SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1;
SELECT count(*) FROM (SELECT random() * x FROM generate_series(1,1000000) AS F(x) ORDER BY 1) q;
});

ok(-f "$tbsp2_tmp/pgsql_tmp1.1", "temp file pgsql_tmp1.1 exists in tablespace myts2");
Expand Down