mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 19:38:24 +00:00
e8e764c064
Sometimes spec which is testing order groups by user count is failing. My theory is that cause is the randomness of Postgres when the order value is the same for 2 rows. In spec, we got three groups `moderator_group` - 0 users `group` - 1 user `other_group` - 1 user And we are expecting that controller will return them in ascending order [moderator, group, other_group] Because `group` and `other_group` contain the same amount of users, we are dealing with luck Therefore, I believe that adding one more user to other_group should make that query reliable. It was not crashing on my local machine, so I am not 100% sure.