| From: | Daniel Gustafsson <daniel(at)yesql(dot)se> | 
|---|---|
| To: | Dong Wook Lee <sh95119(at)gmail(dot)com> | 
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: vacuumlo: add test to vacuumlo for test coverage | 
| Date: | 2022-09-08 12:53:32 | 
| Message-ID: | DF9A0FD2-1EF1-4C17-A63F-6A8153BC4632@yesql.se | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> On 3 Sep 2022, at 10:27, Dong Wook Lee <sh95119(at)gmail(dot)com> wrote:
> I write a tiny patch about vacuumlo to improve test coverage.
If we are paying for setting up a cluster we might as well test more scenarios
than just the one.  Perhaps some other low-hanging fruit like calling vacuumlo
on a non-existing databsase, on one where no LO have been made etc?
One thing about the patch:
+IPC::Run::run [ 'vacuumlo', '-v', '-n', '-p', $port, 'postgres' ], '>', \$stdout;
This should use run_command() which provides facilities for running commands
and capturing STDOUT.  With this the test can be rewritten something like:
my ($out, $err) = run_command(['vacuumlo', .. ]);
like($out, ..);
run_command() is defined in PostgreSQL::Test::Utils.
--
Daniel Gustafsson		https://vmware.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashutosh Bapat | 2022-09-08 12:53:45 | Re: confirmed_flush_lsn shows LSN of the data that has not yet been received by the logical subscriber. | 
| Previous Message | Daniel Gustafsson | 2022-09-08 12:32:22 | Re: proposal: possibility to read dumped table's name from file |