Re: Injection points: some tools to wait and wake

Поиск
Список
Период
Сортировка
От Andrey M. Borodin
Тема Re: Injection points: some tools to wait and wake
Дата
Msg-id 9A364318-C150-469D-9BA9-6C9298B7C6E8@yandex-team.ru
обсуждение исходный текст
Ответ на Re: Injection points: some tools to wait and wake  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Ответы Re: Injection points: some tools to wait and wake  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Список pgsql-hackers
Hi,

> On 27 Feb 2024, at 16:08, Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote:
>
> On Tue, Feb 27, 2024 at 11:00:10AM +0500, Andrey M. Borodin wrote:
>>
>> But, AFAICS, the purpose is the same: wait until event happened.
>
> I think it's easier to understand the tests (I mean what the purpose of the
> injection points are) if we don't use an helper function. While the helper
> function would make the test easier to read / cleaner, I think it may make them
> more difficult to understand as 'await_injection_point' would probably be too
> generic.

For the record: I’m fine if there is no such function.
There will be at least one implementation of this function in every single test with waiting injection points.
That’s the case where we might want something generic.
What the specific there might be? The test can check that
 - conditions are logged
 - injection point reached in specific backend (e.g. checkpointer)
etc

I doubt that this specific checks worth cleanness of the test. And sacrificing test readability in favour of teaching
readerwhat injection points are sounds strange. 


Best regards, Andrey Borodin.


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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: pread, pwrite, etc return ssize_t not int
Следующее
От: Pradeep Kumar
Дата:
Сообщение: Seeking Clarification on Logical Replication Start LSN