diff --git a/contrib/pg_tde/t/003_remote_config.pl b/contrib/pg_tde/t/003_remote_config.pl index d7d2c70aa25..d3fbfa677ca 100644 --- a/contrib/pg_tde/t/003_remote_config.pl +++ b/contrib/pg_tde/t/003_remote_config.pl @@ -49,6 +49,7 @@ use pgtde; } my $pid = MyWebServer->new(8888)->background(); +END { kill('TERM', $pid); } PGTDE::setup_files_dir(basename($0)); @@ -85,8 +86,6 @@ PGTDE::psql($node, 'postgres', 'DROP EXTENSION pg_tde;'); $node->stop; -kill('TERM', $pid); - # Compare the expected and out file my $compare = PGTDE->compare_results(); diff --git a/contrib/pg_tde/t/006_remote_vault_config.pl b/contrib/pg_tde/t/006_remote_vault_config.pl index a1d6f6e0664..c84029637e2 100644 --- a/contrib/pg_tde/t/006_remote_vault_config.pl +++ b/contrib/pg_tde/t/006_remote_vault_config.pl @@ -58,6 +58,7 @@ use pgtde; } my $pid = MyWebServer->new(8889)->background(); +END { kill('TERM', $pid); } PGTDE::setup_files_dir(basename($0)); @@ -94,8 +95,6 @@ PGTDE::psql($node, 'postgres', 'DROP EXTENSION pg_tde;'); $node->stop; -kill('TERM', $pid); - # Compare the expected and out file my $compare = PGTDE->compare_results();