Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1400 from arunagw/query_cache_test

Query cache test
  • Loading branch information...
commit 56f13a334118ea90bcfc90b23c1c8e318954eb9c 2 parents ce23c6e + fe99a81
@tenderlove tenderlove authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 activerecord/test/cases/query_cache_test.rb
View
11 activerecord/test/cases/query_cache_test.rb
@@ -51,16 +51,23 @@ def test_cache_is_flat
end
def test_cache_does_not_wrap_string_results_in_arrays
- require 'sqlite3/version' if current_adapter?(:SQLite3Adapter)
+ require 'sqlite3/version' if current_adapter?(:SQLite3Adapter) && !(RUBY_PLATFORM =~ /java/)
Task.cache do
# Oracle adapter returns count() as Fixnum or Float
if current_adapter?(:OracleAdapter)
assert_kind_of Numeric, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
- elsif current_adapter?(:SQLite3Adapter) && SQLite3::VERSION > '1.2.5' or current_adapter?(:Mysql2Adapter)
+ elsif !(RUBY_PLATFORM =~ /java/) &&
+ ((current_adapter?(:SQLite3Adapter) && SQLite3::VERSION > '1.2.5') or
+ current_adapter?(:Mysql2Adapter))
# Future versions of the sqlite3 adapter will return numeric
assert_instance_of Fixnum,
Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
+ elsif (RUBY_PLATFORM =~ /java/) &&
+ ((current_adapter?(:SQLite3Adapter)) or
+ current_adapter?(:MysqlAdapter))
+ assert_instance_of Fixnum,
+ Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
else
assert_instance_of String, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
end
Please sign in to comment.
Something went wrong with that request. Please try again.