From 5d212a591e2a349c0f4a94e3a0156d94a70253e1 Mon Sep 17 00:00:00 2001 From: DmitryTsepelev Date: Mon, 15 Nov 2021 21:46:01 +0300 Subject: [PATCH] Fix flaky test in HasManyThroughDisableJoinsAssociationsTest --- activerecord/test/models/author.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb index 0d97b1055280e..4f423162468b2 100644 --- a/activerecord/test/models/author.rb +++ b/activerecord/test/models/author.rb @@ -53,13 +53,13 @@ def ratings has_many :ratings, through: :comments has_many :good_ratings, - -> { where("ratings.value > 5") }, + -> { where("ratings.value > 5").order(:id) }, through: :comments, source: :ratings has_many :no_joins_ratings, through: :no_joins_comments, disable_joins: :true, source: :ratings has_many :no_joins_good_ratings, - -> { where("ratings.value > 5") }, + -> { where("ratings.value > 5").order(:id) }, through: :comments, source: :ratings, disable_joins: true