Re: vacuumlo: add test to vacuumlo for test coverage

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: vacuumlo: add test to vacuumlo for test coverage
Дата
Msg-id DF9A0FD2-1EF1-4C17-A63F-6A8153BC4632@yesql.se
обсуждение исходный текст
Ответ на vacuumlo: add test to vacuumlo for test coverage  (Dong Wook Lee <sh95119@gmail.com>)
Список pgsql-hackers
> On 3 Sep 2022, at 10:27, Dong Wook Lee <sh95119@gmail.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/




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: proposal: possibility to read dumped table's name from file
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: confirmed_flush_lsn shows LSN of the data that has not yet been received by the logical subscriber.