aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/bind_parameter_test.rb
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2019-06-20 14:12:58 +0000
committerYasuo Honda <yasuo.honda@gmail.com>2019-06-20 15:07:58 +0000
commit688da62a4c43438374fa58b3aa028082a15b5e9e (patch)
tree275f30305c7092ea59c779d511982e79b709b157 /activerecord/test/cases/bind_parameter_test.rb
parente14f3f3c1186fb452ff0ff2d63577a5174a77c1f (diff)
downloadrails-688da62a4c43438374fa58b3aa028082a15b5e9e.tar.gz
rails-688da62a4c43438374fa58b3aa028082a15b5e9e.tar.bz2
rails-688da62a4c43438374fa58b3aa028082a15b5e9e.zip
Address test_statement_cache_with_in_clause failure due to nondeterministic sort order
This failure is occasional, does not always reproduce. ```ruby $ cd activerecord $ bundle exec rake test_postgresql ... snip ... ....F Failure: ActiveRecord::BindParameterTest#test_statement_cache_with_in_clause [/home/yahonda/git/rails/activerecord/test/cases/bind_parameter_test.rb:97]: Expected: [1, 3] Actual: [3, 1] rails test home/yahonda/git/rails/activerecord/test/cases/bind_parameter_test.rb:93 ```
Diffstat (limited to 'activerecord/test/cases/bind_parameter_test.rb')
-rw-r--r--activerecord/test/cases/bind_parameter_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/bind_parameter_test.rb b/activerecord/test/cases/bind_parameter_test.rb
index 85685d1d00..720446b39d 100644
--- a/activerecord/test/cases/bind_parameter_test.rb
+++ b/activerecord/test/cases/bind_parameter_test.rb
@@ -93,7 +93,7 @@ if ActiveRecord::Base.connection.prepared_statements
def test_statement_cache_with_in_clause
@connection.clear_cache!
- topics = Topic.where(id: [1, 3])
+ topics = Topic.where(id: [1, 3]).order(:id)
assert_equal [1, 3], topics.map(&:id)
assert_not_includes statement_cache, to_sql_key(topics.arel)
end