Re: Default ordering option

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: Default ordering option
Дата
Msg-id 20190727171853.h3wmvmubrpbft3em@hjp.at
обсуждение исходный текст
Ответ на Re: Default ordering option  (Cyril Champier <cyril.champier@doctolib.com>)
Список pgsql-general
On 2019-07-26 09:52:52 +0200, Cyril Champier wrote:
> No, the code I pasted was an existing production bug: the last_name
> should have been unique, so the selected patient would always be the
> same. This should have been detected in tests, but since the order was
> "almost always the same", our test was green 99% of the time, so we
> discarded it as flaky.
>
> Fuzzy testing could be an option, but this would go too far, as for
> Peter extension suggestion. We have huge existing codebase with more
> than 10K tests, and I do not want to modify our whole testing
> strategy.
>
> Meanwhile, I went for an ORM patch (ActiveRecord) and forbid usages
> that can workaround it.

Another idea:

How do ypu prepare your test data? Do you have a (possibly large) test
database or do you populate a test database with test-specific data in a
fixture?

If you do the latter, you might be able insert the data in random order.

        hp

--
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>

Вложения

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

Предыдущее
От: Arya F
Дата:
Сообщение: Re: Hardware for writing/updating 12,000,000 rows per hour
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Why does backend send buffer size hardcoded at 8KB?