Re: Truncate logs by max_log_size

Поиск
Список
Период
Сортировка
От Kirill Gavrilov
Тема Re: Truncate logs by max_log_size
Дата
Msg-id CA+E0NR7xYFtHpfnySWrA+CLA8t2sWy4w3XQA7LRXPALZHWgYvg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Truncate logs by max_log_size  (Kirill Reshke <reshkekirill@gmail.com>)
Список pgsql-hackers

Hi

> +for (my $attempts = 0; $attempts < $max_attempts; $attempts++)
> +{
> + eval {
> + $current_logfiles = slurp_file($node->data_dir . '/current_logfiles');
> + };
> + last unless $@;
> + usleep(100_000);
> +}


`usleep` in tap tests is usually a bad pattern. Do we have a chance to
test this using `wait_for_log` or similar?
 
I'm not sure we can use `wait_for_log` because it checks for only one logfile. But even if it's possible, I don't think it's a good idea to use different checks in the same file or to change tests for another feature. I used test case from above as an example for mine.

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